提交 9f7f29ec581960203d6376cf8ef3cfc51a765527

作者 wangyu
2 个父辈 a04255cb 0d82f4c1

Merge branch 'dev2.0' into 海峡

# Conflicts:
#	app.js
1 1 //app.js
2 2 const appId = 'wx04262fa98a7de5b6';
3 3 App({
4   - onLaunch: function () {
  4 + onLaunch: function() {
5 5 var that = this;
6 6 console.log("onlaunch---", "onlaunch");
7 7 //调用API从本地缓存中获取数据
... ... @@ -9,44 +9,59 @@ App({
9 9 logs.unshift(Date.now())
10 10 wx.setStorageSync('logs', logs)
11 11 wx.login({
12   - success: function (res) {
  12 + success: function(res) {
13 13 if (res.code) {
14   - that.getTokenByCode(res.code, true)
  14 + var requestdata = {
  15 + "grant_type": "wx_app_code",
  16 + "code": res.code,
  17 + "scope": "global_access:end_user,tenant:" + appId
  18 + };
  19 + that.getTokenByCode(requestdata, true,"")
15 20 }
16 21 }
17 22 })
18 23 },
19 24
20   - onShow: function (res) {
  25 + onShow: function(res) {
21 26 console.log("onShow----", res);
22 27 var that = this;
23 28 that.globalData.onshow_count++;
24   - if (that.globalData.onshow_count > 1) {//除第一次进入小程序之外的打开时
25   - wx.login({
26   - success: function (res) {
27   - if (res.code) {
28   - that.getTokenByCode(res.code, false)
  29 + if (that.globalData.onshow_count > 1) { //除第一次进入小程序之外的打开时
  30 + if (res.path =="pages/main/smartchat/chat") {//聊天页面锁屏再打开,走该逻辑
  31 + var requestdata = {
  32 + "grant_type": "refresh_token",
  33 + "refresh_token": that.globalData.refresh_token,
  34 + "scope": "global_access:end_user,tenant:" + that.globalData.com_id
  35 + };
  36 + that.getTokenByCode(requestdata, false,"")
  37 + } else {
  38 + wx.login({
  39 + success: function(res) {
  40 + if (res.code) {
  41 + var requestdata = {
  42 + "grant_type": "wx_app_code",
  43 + "code": res.code,
  44 + "scope": "global_access:end_user,tenant:" + appId
  45 + };
  46 + that.getTokenByCode(requestdata, false,"chat")
  47 + }
29 48 }
30   - }
31   - })
  49 + })
  50 + }
32 51 }
33 52 },
34 53
35   - getTokenByCode: function (code, relaunch) {
  54 + getTokenByCode: function(requestdata, relaunch,str) {
36 55 var that = this;
37 56 var baseUrl = that.globalData.baseUrl;
38 57 wx.request({
39 58 url: baseUrl + 'uaa/v1/auth/tokens',
40   - data: {
41   - "grant_type": "wx_app_code",
42   - "code": code,
43   - "scope": "global_access:end_user,tenant:" + appId
44   - },
  59 + data: requestdata,
45 60 method: "POST",
46 61 header: {
47 62 'content-type': 'application/json'
48 63 },
49   - success: function (res) {
  64 + success: function(res) {
50 65 console.log("getTokenByCode", res.data)
51 66 var user = res.data.user;
52 67 var tenant = res.data.tenant;
... ... @@ -57,11 +72,11 @@ App({
57 72 that.globalData.wx_open_id = user.wx_open_id;
58 73 that.globalData.Authorization = "Bearer " + res.data.access_token;
59 74 that.globalData.refresh_token = res.data.refresh_token;
60   - if (user && user.type == "0") {//匿名用户
  75 + if (user && user.type == "0") { //匿名用户
61 76 wx.redirectTo({
62 77 url: '../../getPhone/getPhone'
63 78 })
64   - } else if (user && user.type == "1") {//注册用户
  79 + } else if (user && user.type == "1") { //注册用户
65 80 that.configOssUrl()
66 81 if (relaunch) {
67 82 wx.reLaunch({
... ... @@ -70,12 +85,18 @@ App({
70 85 }
71 86 }
72 87 },
73   - fail: function (res) {
  88 + fail: function(res) {
74 89 console.log("login-res-fail", res);
75 90 },
  91 + complete:function(res){
  92 + if(str=="chat"){
  93 + that.globalData.refresh_complete = true
  94 + }
  95 + }
76 96 })
77 97 },
78   - getUserInfo: function (cb) {
  98 +
  99 + getUserInfo: function(cb) {
79 100 var that = this
80 101 if (this.globalData.userInfo) {
81 102 typeof cb == "function" && cb(this.globalData.userInfo)
... ... @@ -83,7 +104,7 @@ App({
83 104 //调用登录接口
84 105 wx.getUserInfo({
85 106 withCredentials: false,
86   - success: function (res) {
  107 + success: function(res) {
87 108 console.log("userInfo---", res)
88 109 that.globalData.userInfo = res.userInfo
89 110 typeof cb == "function" && cb(that.globalData.userInfo)
... ... @@ -92,7 +113,7 @@ App({
92 113 }
93 114 },
94 115
95   - configOssUrl: function () {
  116 + configOssUrl: function() {
96 117 wx.showLoading()
97 118 var that = this
98 119 wx.request({
... ... @@ -101,18 +122,18 @@ App({
101 122 'Authorization': this.globalData.Authorization
102 123 },
103 124 method: 'GET',
104   - success: function (result) {
  125 + success: function(result) {
105 126 console.log('获取OSSURL 成功', result.data)
106 127 that.globalData.OSSUrl = result.data.app_url;
107 128 },
108   - fail: function (res) {
  129 + fail: function(res) {
109 130 console.log('获取OSSURL 失败', res)
110 131 wx.showToast({
111 132 icon: "none",
112 133 title: "云存储功能失效,请联系开发人员",
113 134 })
114 135 },
115   - complete: function () {
  136 + complete: function() {
116 137 wx.hideLoading()
117 138 }
118 139 })
... ... @@ -120,11 +141,25 @@ App({
120 141
121 142 globalData: {
122 143 appId: appId,
  144 + com_id: "",
123 145 onshow_count: 0,
  146 +<<<<<<< HEAD
124 147 // baseUrl: "http://47.110.158.110:20000/",
125 148 baseUrl: "https://api.fjhxrl.com/",
126 149 OSSUrl: "",
  150 +=======
  151 + refresh_complete:false,
  152 + // baseUrl: "http://47.99.47.16:20000/",
  153 + // baseUrl: "http://47.96.75.229:20000/",
  154 + // baseUrl: "http://192.144.144.220:20000/",
  155 + // baseUrl: "http://154.8.229.55:20000/",
  156 + // baseUrl: "http://47.110.250.177:20000/",
  157 + // baseUrl: "http://47.110.158.110:20000/",
  158 + baseUrl: "https://api.workai.com.cn/",
  159 + OSSUrl: "", //"https://oss.workai.com.cn/",
  160 +>>>>>>> dev2.0
127 161 userInfo: null,
  162 + hostInfo:null,
128 163 hasLogin: false,
129 164 openid: null,
130 165 Authorization: null,
... ...
... ... @@ -176,4 +176,9 @@
176 176 overflow: hidden;
177 177 text-overflow:ellipsis;
178 178 white-space:nowrap;
  179 +}
  180 +.weui-cell__bd {
  181 + -webkit-box-flex: 1;
  182 + -webkit-flex: 1;
  183 + flex: 1;
179 184 }
\ No newline at end of file
... ...

118.2 KB | 宽: | 高:

118.5 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
... ... @@ -8,11 +8,13 @@ Page({
8 8 * Page initial data
9 9 */
10 10 data: {
11   - support_duty_id: "",
  11 + legal_entity_id: "",
  12 + supporter_id: "",
12 13 name: "",
13 14 nation: "",
14 15 id_card_no: "",
15   - birthday:"",
  16 + birthday: "",
  17 + datas: "",
16 18 birthday_datelong: -1,
17 19 },
18 20
... ... @@ -21,9 +23,24 @@ Page({
21 23 */
22 24 onLoad: function(options) {
23 25 console.log("onLoad", options)
24   - this.setData({
25   - support_duty_id: options.id
26   - })
  26 + if (options.id) {
  27 + this.setData({
  28 + legal_entity_id: options.id,
  29 + })
  30 + }
  31 +
  32 + if (options.datas && JSON.parse(options.datas)) {
  33 + var curdata = JSON.parse(options.datas)
  34 + this.setData({
  35 + datas: curdata,
  36 + supporter_id: curdata.id,
  37 + name: curdata.co_supporter,
  38 + id_card_no: curdata.id_card_no,
  39 + birthday: curdata.birthday ? this.formatDate(curdata.birthday) : "",
  40 + birthday_datelong: Date.parse(new Date(curdata.birthday)) / 1000
  41 + })
  42 + }
  43 +
27 44 },
28 45
29 46 /**
... ... @@ -44,10 +61,6 @@ Page({
44 61 console.log('id_info', res.data)
45 62 if (res.data && res.data.length > 0) {
46 63 var id_info = JSON.parse(res.data)
47   - if (that.data.name.length > 0 && id_info.name != that.data.name) {
48   - that.showtoast("姓名冲突")
49   - return
50   - }
51 64 var birth_day
52 65 if (id_info.birthday.month > 9 && id_info.birthday.day > 9) {
53 66 birth_day = id_info.birthday.year + '-' + id_info.birthday.month + '-' + id_info.birthday.day;
... ... @@ -58,7 +71,7 @@ Page({
58 71 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) {
59 72 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
60 73 }
61   -
  74 + console.log("birth_day", birth_day)
62 75 that.setData({
63 76 name: id_info.name,
64 77 id_card_no: id_info.id_card_number,
... ... @@ -96,7 +109,7 @@ Page({
96 109 this.showToast("证件号码有误")
97 110 return;
98 111 }
99   - if (this.data.birthday.length < 1 ){
  112 + if (this.data.birthday.length < 1) {
100 113 this.showToast("请选择出生日期")
101 114 return;
102 115 }
... ... @@ -109,7 +122,8 @@ Page({
109 122 wx.request({
110 123 url: baseUrl + 'persontax/v1/co-supporters',
111 124 data: {
112   - "support_duty_id": that.data.support_duty_id,
  125 + "id": that.data.supporter_id,
  126 + "legal_entity_id": that.data.legal_entity_id,
113 127 "co_supporter": formdata.name,
114 128 "id_card_type": "1",
115 129 "id_card_no": formdata.id_card_no,
... ... @@ -124,22 +138,28 @@ Page({
124 138 method: "POST",
125 139 success: function(res) {
126 140 if (res && res.data) {
127   - console.log("res", res)
128   - if (res && res.statusCode == 200) {
  141 + console.log("succ", res)
  142 + if (res.statusCode == 200) {
129 143 wx.navigateBack({
130 144 delta: 1
131 145 })
  146 + } else {
  147 + that.showToast(res.data.message)
132 148 }
133 149 }
  150 + },
  151 + fail: function(res) {
  152 + console.log("fail", res)
  153 + that.showToast(res.data.message)
134 154 }
135 155 })
136 156 },
137 157
138   - bindDateChange:function(e){
  158 + bindDateChange: function(e) {
139 159 console.log('picker发送选择改变,携带值为', e)
140 160 this.setData({
141 161 birthday: e.detail.value,
142   - birthday_datelong : Date.parse(new Date(e.detail.value)) / 1000
  162 + birthday_datelong: Date.parse(new Date(e.detail.value)) / 1000
143 163 })
144 164 },
145 165
... ... @@ -152,8 +172,8 @@ Page({
152 172 }
153 173 },
154 174
155   - bindinput:function(e){
156   - console.log("bindinput",e.detail.value)
  175 + bindinput: function(e) {
  176 + console.log("bindinput", e.detail.value)
157 177 var idCardNo = e.detail.value
158 178 if (idCardNo.length == 18) {
159 179 if (!format.isIDCardNum(idCardNo)) {
... ... @@ -172,6 +192,16 @@ Page({
172 192 }
173 193 },
174 194
  195 + formatDate(date) {
  196 + if (date == 0 || date == -62135596800) {
  197 + date = ""
  198 + } else {
  199 + date = format.formatTime_date(date)
  200 + }
  201 + console.log("formatDate", date)
  202 + return date
  203 + },
  204 +
175 205 /**
176 206 * Lifecycle function--Called when page hide
177 207 */
... ...
... ... @@ -9,13 +9,13 @@
9 9 <!-- <input placeholder-class='input_placeholder_wrap' class='input_wrap' placeholder='请输入姓名' name='name' value='{{name}}' maxlength='18'></input> -->
10 10 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入姓名' name='name' value='{{name}}'></input>
11 11 </view>
12   - <view class="divide_line"></view>
  12 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
13 13 <view style='height:90rpx;padding:0 30rpx'>
14 14 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
15 15 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>共同赡养人证照类型</text>
16 16 <text style='color:#333;font-size: 30rpx;line-height: 90rpx; float:right'>居民身份证</text>
17 17 </view>
18   - <view class='divide_line'></view>
  18 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
19 19 <view style='height:90rpx;padding:0 30rpx'>
20 20 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
21 21 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>共同赡养人证照号码</text>
... ... @@ -24,7 +24,7 @@
24 24 <input class='input_wrap01 float_right' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' type='idcard' value='{{id_card_no}}' bindinput="bindinput"></input>
25 25 </view>
26 26 </view>
27   - <view class="divide_line"></view>
  27 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
28 28 <picker mode="date" value="{{date}}" start="1919-01-01" end="2017-09-01" bindchange="bindDateChange">
29 29 <view style='height:90rpx;padding:0 30rpx'>
30 30 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
... ... @@ -34,19 +34,19 @@
34 34 </view>
35 35 </picker>
36 36 <!-- <template is="picker_cell_normal" data="{{...commonbirthDate}}" /> -->
37   - <view class="divide_line"></view>
  37 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
38 38 <view style='height:90rpx;padding:0 30rpx'>
39 39 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
40 40 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>被赡养人国籍</text>
41 41 <text style='color:#333;font-size: 30rpx;line-height: 90rpx; float:right'>中国</text>
42 42 </view>
43   - <view class="divide_line"></view>
  43 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
44 44 <view style='height:90rpx;padding:0 30rpx'>
45 45 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
46 46 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>与纳税人关系</text>
47 47 <text style='color:#333;font-size: 30rpx;line-height: 90rpx; float:right'>兄、弟、姐、妹</text>
48 48 </view>
49   - <view class="divide_line"></view>
  49 + <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view>
50 50 <view class="btn_bottom">
51 51 <button class="btn_bottom" formType="submit"> 保存</button>
52 52 </view>
... ...
... ... @@ -36,8 +36,11 @@ Page({
36 36 supporttype:"",
37 37 is_single:"",
38 38 share_method:"",
  39 + isEdit:false,
  40 + edit_id:null,
39 41 data: {
40 42 hasLover:false,
  43 + hasGetLover:false,
41 44 house_type: "",
42 45 deduction_amount: '',
43 46 lable: 0,
... ... @@ -74,6 +77,7 @@ Page({
74 77 label: '出生日期',
75 78 bindtype: 'loverbirthday',
76 79 selected: '',
  80 + disabled: true,
77 81 placeholder: '请选择出生日期',
78 82 mode: "date",
79 83 fields: "day",
... ... @@ -84,11 +88,12 @@ Page({
84 88 older_relativeData: {
85 89 label: '与纳税人关系',
86 90 isrequre: true,
  91 + // disabled: true,
87 92 bindtype: 'older_relative',
88   - selected: '',
  93 + selected: "",
89 94 isblack: 'true',
90 95 placeholder: '请选择与纳税人关系',
91   - values: ["父母", "祖父母、外祖父母"],
  96 + values: ["父母", "其他"],
92 97 onChange: 'onPickerSelect'
93 98 },
94 99 taxperson_relativeData: {
... ... @@ -127,10 +132,11 @@ Page({
127 132 commonbirthDate: {
128 133 label: '出生日期',
129 134 isrequre: true,
  135 + disabled:true,
130 136 bindtype: 'commonbirthday',
131 137 selected: '',
132 138 isblack: 'true',
133   - placeholder: '请选择出生日期',
  139 + placeholder: '出生日期',
134 140 mode: "date",
135 141 fields: "day",
136 142 start: '1970-01-01',
... ... @@ -143,7 +149,8 @@ Page({
143 149 bindtype: 'child_edu_degree',
144 150 selected: '',
145 151 isblack: 'true',
146   - values: ["学前教育(满3岁)", "小学教育", "初中教育", "普通高中教育", "中等职业教育", "大学专科教育", "大学本科教育", "硕士研究生教育", "博士研究生教育"],
  152 + // values: ["学前教育(满3岁)", "小学教育", "初中教育", "普通高中教育", "中等职业教育", "大学专科教育", "大学本科教育", "硕士研究生教育", "博士研究生教育"],
  153 + values: ["学前教育阶段", "义务教育", "高中阶段教育", "高等教育"],
147 154 placeholder: '请选择教育阶段',
148 155 onChange: 'onPickerSelect'
149 156 },
... ... @@ -176,13 +183,23 @@ Page({
176 183 placeholder: '请选择教育类型',
177 184 onChange: 'onPickerSelect'
178 185 },
  186 + certificateDate: {
  187 + label: '证书名称',
  188 + maxWidth: 460,
  189 + isrequre: true,
  190 + bindtype: 'certificate',
  191 + values: [],
  192 + placeholder: '请输入证书名称',
  193 + onChange: 'onPickerSelect'
  194 + },
179 195 edulevelData: {
180 196 label: '教育阶段',
181 197 isrequre: true,
182 198 bindtype: 'edu_level',
183 199 selected: '',
184 200 isblack: 'true',
185   - values: ["专科", "本科", "硕士研究生", "博士研究生", "其他"],
  201 + // values: ["专科", "本科", "硕士研究生", "博士研究生", "其他"],
  202 + values: ["大学专科", "大学本科", "硕士研究生", "博士研究生", "其他"],
186 203 placeholder: '请选择学历教育阶段',
187 204 onChange: 'onPickerSelect'
188 205 },
... ... @@ -235,10 +252,11 @@ Page({
235 252 olderbirthDate: {
236 253 label: '被赡养人出生日期',
237 254 isrequre: true,
  255 + disabled: true,
238 256 bindtype: 'olderbirthday',
239 257 selected: '',
240 258 isblack: 'true',
241   - placeholder: '请选择日期',
  259 + placeholder: '出生日期',
242 260 mode: "date",
243 261 fields: "day",
244 262 start: '1970-01-01',
... ... @@ -246,7 +264,7 @@ Page({
246 264 onChange: 'onPickerSelect',
247 265 },
248 266 beforemarryData: {
249   - label: '是否首套婚前贷款且婚后各自扣除',
  267 + label: '是否首套婚前贷款且婚后分别扣除50%',
250 268 bindtype: 'before_marry',
251 269 selected: '',
252 270 isrequre: true,
... ... @@ -276,7 +294,7 @@ Page({
276 294 onChange: 'onPickerSelect'
277 295 },
278 296 studystartdate: {
279   - label: '受教育日期起',
  297 + label: '受教育时间起',
280 298 isrequre: true,
281 299 bindtype: 'study_start_date',
282 300 selected: '',
... ... @@ -285,15 +303,16 @@ Page({
285 303 placeholder: '请选择时间',
286 304 onChange: 'onPickerSelect',
287 305 mode: "date",
288   - fields: "day",
  306 + fields: "month",
289 307 datelong: 0,
290 308 start: '1970-01-01',
  309 + end: (new Date()).getFullYear() +'-'+ ((new Date()).getMonth()+1),
291 310 // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01',
292 311 // end: (new Date()).getFullYear() + '-09-01',
293 312 // onTap: 'studyDataTap'
294 313 },
295   - studyenddate: {
296   - label: '教育终止时间',
  314 + studyEndDate: {
  315 + label: '受教育时间止',
297 316 isrequre: true,
298 317 bindtype: 'study_end_date',
299 318 selected: '',
... ... @@ -302,7 +321,22 @@ Page({
302 321 placeholder: '请选择时间',
303 322 onChange: 'onPickerSelect',
304 323 mode: "date",
305   - fields: "day",
  324 + fields: "month",
  325 + start: '1970-01-01',
  326 + // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01',
  327 + // end: (new Date()).getFullYear() + '-09-01',
  328 + // onTap: 'studyDataTap'
  329 + },
  330 + studyPeriodDate: {
  331 + label: '教育终止时间',
  332 + // isrequre: true,
  333 + bindtype: 'study_per_date',
  334 + selected: '',
  335 + values: ["是", "否"],
  336 + placeholder: '请选择时间',
  337 + onChange: 'onPickerSelect',
  338 + mode: "date",
  339 + fields: "month",
306 340 start: '1970-01-01',
307 341 // start: (new Date()).getFullYear() + '-07-31',//'1970-01-01',
308 342 // end: (new Date()).getFullYear() + '-07-31',
... ... @@ -329,7 +363,8 @@ Page({
329 363 selected: '',
330 364 isrequre: true,
331 365 isblack: 'true',
332   - values: ["产权证", "不动产权登记证", "出售合同号", "预售合同号"],
  366 + // values: ["产权证", "不动产权登记证", "出售合同号", "预售合同号"],
  367 + values: ["房屋所有权证", "不动产权证", "房屋买卖合同", "房屋预售合同"],
333 368 placeholder: '请选择证书类型',
334 369 onChange: 'onPickerSelect'
335 370 },
... ... @@ -371,9 +406,9 @@ Page({
371 406 label: '房屋坐落地址',
372 407 mode: 'region',
373 408 maxWidth: 430,
374   - isrequre: true,
  409 + // isrequre: true,
375 410 bindtype: 'house_locate',
376   - isblack: 'true',
  411 + // isblack: 'true',
377 412 address_code: ['', '', ''],
378 413 address_value: ['', '', ''],
379 414 selected: '',
... ... @@ -384,10 +419,10 @@ Page({
384 419 rentLocateInfo: {
385 420 label: '租赁房屋坐落地址',
386 421 mode: 'region',
387   - isrequre: true,
  422 + // isrequre: true,
388 423 maxWidth: 375,
389 424 bindtype: 'rent_house_locate',
390   - isblack: 'true',
  425 + // isblack: 'true',
391 426 address_code: ['', '', ''],
392 427 address_value: ['', '', ''],
393 428 selected: '',
... ... @@ -522,16 +557,19 @@ Page({
522 557 }
523 558 if ("children_education" == options.status) {
524 559 this.loadCountry()
525   - this.getTaxList()
  560 + if (options.isedit != 'true'){
  561 + this.getTaxList()
  562 + }
526 563 } else if ("continuing_education" == options.status) {
  564 + this.getCertificates()
527 565 var studystart_date = this.data.studystartdate
528 566 studystart_date.label = "入学时间起"
529   - var studyend_date = this.data.studyenddate
  567 + var studyend_date = this.data.studyEndDate
530 568 studyend_date.label = "(预计)毕业时间"
531   -
  569 + studyend_date.isrequre = true
532 570 this.setData({
533 571 studystartdate: studystart_date,
534   - studyenddate: studyend_date
  572 + studyEndDate: studyend_date
535 573 })
536 574 } else if ("medical_fund" == options.status) {
537 575 var cardtype_data = this.data.cardtypeData
... ... @@ -553,6 +591,9 @@ Page({
553 591 })
554 592 } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") {
555 593 this.getbanklist()
  594 + if (options.isedit != 'true') {
  595 + this.getTaxList()
  596 + }
556 597 house_type = "house_fund_rent"
557 598 title = '住房租金'
558 599 if (options.reducetype == '月度') {
... ... @@ -564,7 +605,9 @@ Page({
564 605 }
565 606 } else if (frontPage.data.house_type == "house_fund_loan") {
566 607 this.getbanklist()
567   - this.getTaxList()
  608 + if (options.isedit != 'true') {
  609 + this.getTaxList()
  610 + }
568 611 house_type = "house_fund_loan"
569 612 title = '住房贷款利息'
570 613 if (options.reducetype == '月度') {
... ... @@ -590,7 +633,13 @@ Page({
590 633 })
591 634 this.initOSS()
592 635 if (options.datas && options.datas.length > 0 && options.datas !="undefined") {
593   - this.handleTransData(JSON.parse(options.datas))
  636 + if (options.isedit == 'true'){
  637 + this.isEdit = true
  638 + this.handlEditData(JSON.parse(options.datas))
  639 + }else{
  640 + this.isEdit = false
  641 + this.handleTransData(JSON.parse(options.datas))
  642 + }
594 643 }
595 644 },
596 645 getTaxList: function () {
... ... @@ -618,7 +667,8 @@ Page({
618 667 if (res.data.items && res.data.items[0]) {
619 668 var hasLoverData = that.data.hasLoverData
620 669 hasLoverData.selected = '是'
621   - var data = res.data.items[0], setData = { hasLover: true, hasLoverData: hasLoverData}
  670 + hasLoverData.disabled = true
  671 + var data = res.data.items[0], setData = { hasGetLover:true, hasLover: true, hasLoverData: hasLoverData}
622 672 if (data.name && data.name.length) {
623 673 setData.spouse_name = data.name
624 674 }
... ... @@ -652,28 +702,43 @@ Page({
652 702 schoolCountryData: country_data
653 703 })
654 704 },
  705 + handlEditData: function (data) {
655 706
656   - handleTransData: function(data) {
  707 + this.edit_id = data.id
  708 + console.log('data===', data)
657 709 switch (this.data.cur_index + '') {
658 710 case 'children_education':
659 711 var setData = {}
660   - if (data.id_card_no && data.id_card_no.length) {
661   - setData.children_id_card_no = data.id_card_no
662   - this.dealIdInfo(data.id_card_no, 'children_id_card_no_input')
663   - }
664   - if (data.name && data.name.length) {
665   - setData.children_name = data.name
666   - }
667   - if (data.birth_date && data.birth_date > 0) {
668   - var commonbirthDate = this.data.commonbirthDate
669   - commonbirthDate.selected = format.formatTime_date(data.birth_date)
670   - commonbirthDate.datelong = data.birth_date
671   - setData.commonbirthDate = commonbirthDate
672   - }
673   - if (data.percent && data.percent.length) {
674   - var childrenpercentData = this.data.childrenpercentData
675   - childrenpercentData.selected = data.percent
676   - setData.childrenpercentData = childrenpercentData
  712 + var commonbirthDate = this.data.commonbirthDate
  713 + commonbirthDate.selected = format.formatTime_date(data.birth_date)
  714 + commonbirthDate.datelong = data.birth_date
  715 + setData.commonbirthDate = commonbirthDate
  716 + var childrenpercentData = this.data.childrenpercentData
  717 + childrenpercentData.selected = data.percent + '%'
  718 + setData.childrenpercentData = childrenpercentData
  719 + var studystartdate = this.data.studystartdate
  720 + studystartdate.selected = format.formatTime_month(data.education_start)
  721 + studystartdate.datelong = data.education_start
  722 + setData.studystartdate = studystartdate
  723 + var studyEndDate = this.data.studyEndDate
  724 + studyEndDate.selected = format.formatTime_month(data.education_end)
  725 + studyEndDate.datelong = data.education_end
  726 + setData.studyEndDate = studyEndDate
  727 + var studyPeriodDate = this.data.studyPeriodDate
  728 + if (data.education_period_end > 0){
  729 + studyPeriodDate.selected = format.formatTime_month(data.education_period_end)
  730 + studyPeriodDate.datelong = data.education_period_end
  731 + }
  732 + studyPeriodDate.start = studystartdate.selected
  733 + studyPeriodDate.end = studyEndDate.selected
  734 + setData.studyPeriodDate = studyPeriodDate
  735 + setData.deduction_amount = data.deduction_amount
  736 + if (data.children_id_card_no && data.children_id_card_no.length) {
  737 + setData.children_id_card_no = data.children_id_card_no
  738 + this.dealIdInfo(data.children_id_card_no, 'children_id_card_no_input')
  739 + }
  740 + if (data.children_name && data.children_name.length) {
  741 + setData.children_name = data.children_name
677 742 }
678 743 if (data.student_no && data.student_no.length) {
679 744 setData.children_student_no = data.student_no
... ... @@ -683,19 +748,6 @@ Page({
683 748 childedudegreeData.selected = data.education_period
684 749 setData.childedudegreeData = childedudegreeData
685 750 }
686   - if (data.education_start && data.education_start.length) {
687   - var studystartdate = this.data.studystartdate
688   - studystartdate.selected = format.formatTime_date(data.education_start)
689   - studystartdate.datelong = data.education_start
690   - setData.studystartdate = studystartdate
691   - }
692   - if (data.education_end && data.education_end.length) {
693   - var studyenddate = this.data.studyenddate
694   - studyenddate.selected = format.formatTime_date(data.education_end)
695   - studyenddate.datelong = data.education_end
696   - setData.studyenddate = studyenddate
697   - console.log("studyenddate", studyenddate)
698   - }
699 751 if (data.school_country && data.school_country.length) {
700 752 var schoolCountryData = this.data.schoolCountryData
701 753 schoolCountryData.selected = data.school_country
... ... @@ -704,193 +756,312 @@ Page({
704 756 if (data.school_name && data.school_name.length) {
705 757 setData.school_name = data.school_name
706 758 }
  759 +
  760 + var hasLoverData = this.data.hasLoverData
  761 + hasLoverData.selected = data.has_spouse == 'y' ? '是' : '否'
  762 + hasLoverData.disabled = data.has_spouse == 'y' ? true : false
  763 + setData.hasLover = data.has_spouse == 'y' ? true : false
  764 + setData.hasGetLover = data.has_spouse == 'y' ? true : false
  765 + setData.hasLoverData = hasLoverData
707 766 if (data.spouse_name && data.spouse_name.length) {
708 767 setData.spouse_name = data.spouse_name
709 768 }
710 769 if (data.spouse_id_card_no && data.spouse_id_card_no.length) {
711 770 setData.spouse_id_card_no = data.spouse_id_card_no
712   - this.dealIdInfo(data.id_card_no, 'spouse_id_card_no_input')
713   - }
714   - if (this.data.loverbirthDate.selected.length) {
715   - var loverbirthDate = this.data.loverbirthDate
716   - loverbirthDate.selected = format.formatTime_date(data.spouse_birthday)
717   - loverbirthDate.datelong = data.spouse_birthday
718   - setData.loverbirthDate = loverbirthDate
  771 + this.dealIdInfo(data.spouse_id_card_no, 'spouse_id_card_no_input')
719 772 }
720   -
721 773 this.setData(setData)
722 774 break;
723 775 case 'continuing_education':
724 776 var setData = {}
725 777 if (data.education_type && data.education_type.length) {
726 778 if ('title' == data.education_type) {
  779 + setData.edu_lable = 'school'
727 780 var edutypeData = this.data.edutypeData
728 781 edutypeData.selected = "学历(学位)继续教育"
729 782 setData.edutypeData = edutypeData
  783 +
  784 + if (data.education_period && data.education_period.length) {
  785 + var edulevelData = this.data.edulevelData
  786 + edulevelData.selected = data.education_period
  787 + setData.edulevelData = edulevelData
  788 + }
  789 + var studystartdate = this.data.studystartdate
  790 + studystartdate.selected = format.formatTime_month(data.education_start)
  791 + studystartdate.datelong = data.education_start
  792 + setData.studystartdate = studystartdate
  793 + var studyEndDate = this.data.studyEndDate
  794 + studyEndDate.selected = format.formatTime_month(data.education_end)
  795 + studyEndDate.datelong = data.education_end
  796 + setData.studyEndDate = studyEndDate
  797 +
730 798 } else {
  799 + setData.edu_lable = 'tech'
731 800 var edutypeData = this.data.edutypeData
732   - edutypeData.selected = data.education_type == 'major' ? "专业技术人员职业资格" : "技能人员职业资格"
  801 + edutypeData.selected = "职业资格继续教育"
  802 + var edustyleData = this.data.edustyleData
  803 + var certificateDate = this.data.certificateDate
  804 + if (data.education_type == 'major'){
  805 + edustyleData.selected = "专业技术人员职业资格"
  806 + // certificateDate.values = this.major_cers // 网络延迟
  807 + } else if (data.education_type == 'profession'){
  808 + edustyleData.selected = "技能人员职业资格"
  809 + // certificateDate.values = this.profs_cers // 网络延迟
  810 + }
733 811 setData.edutypeData = edutypeData
  812 + setData.edustyleData = edustyleData
  813 + var applydate = this.data.applydate
  814 + applydate.selected = format.formatTime_date(data.approval_date)
  815 + applydate.datelong = data.approval_date
  816 + setData.applydate = applydate
  817 +
  818 + if (data.certification_name && data.certification_name.length) {
  819 + certificateDate.selected = data.certification_name
  820 + setData.certificateDate = certificateDate
  821 + }
  822 + if (data.certification_no && data.certification_no.length) {
  823 + setData.certification_no = data.certification_no
  824 + }
  825 + if (data.certification_authority && data.certification_authority.length) {
  826 + setData.certification_authority = data.certification_authority
  827 + }
734 828 }
735 829 }
736   - if (data.education_period && data.education_period.length) {
737   - var edulevelData = this.data.edulevelData
738   - edulevelData.selected = data.education_period
739   - setData.edulevelData = edulevelData
740   - }
741   - if (data.education_start && data.education_start.length) {
742   - var studystartdate = this.data.studystartdate
743   - studystartdate.selected = format.formatTime_date(data.education_start)
744   - studystartdate.datelong = data.education_start
745   - setData.studystartdate = studystartdate
746   - }
747   - if (data.education_end && data.education_end.length) {
748   - var studyenddate = this.data.studyenddate
749   - studyenddate.selected = format.formatTime_date(data.education_end)
750   - studyenddate.datelong = data.education_end
751   - setData.studyenddate = studyenddate
752   - }
753   - if (data.approval_date && data.approval_date.length) {
754   - var applydate = this.data.applydate
755   - applydate.selected = format.formatTime_date(data.approval_date)
756   - applydate.datelong = data.approval_date
757   - setData.applydate = applydate
758   - }
759   - if (data.certification_name && data.certification_name.length) {
760   - setData.certification_name = data.certification_name
761   - }
762   - if (data.certification_no && data.certification_no.length) {
763   - setData.certification_no = data.certification_no
764   - }
765   - if (data.certification_authority && data.certification_authority.length) {
766   - setData.certification_authority = data.certification_authority
767   - }
768 830 this.setData(setData)
769 831 break;
770 832 case 'support_duty':
771 833 var setData = {}
772   - if (data.name && data.name.length) {
773   - setData.supported_name = data.name
  834 + var olderbirthDate = this.data.olderbirthDate
  835 + olderbirthDate.selected = format.formatTime_date(data.birth_date)
  836 + olderbirthDate.datelong = data.birth_date
  837 + setData.olderbirthDate = olderbirthDate
  838 + if (data.supported_name && data.supported_name.length) {
  839 + setData.supported_name = data.supported_name
774 840 }
775 841 if (data.id_card_no && data.id_card_no.length) {
776 842 setData.id_card_no = data.id_card_no
777 843 this.dealIdInfo(data.id_card_no, 'older_id_card_no_input')
778 844 }
779   - if (data.birth_date && data.birth_date.length) {
780   - var olderbirthDate = this.data.olderbirthDate
781   - olderbirthDate.selected = format.formatTime_date(data.birth_date)
782   - olderbirthDate.datelong = data.birth_date
783   - setData.olderbirthDate = olderbirthDate
784   - }
785   - if (data.family_ties && data.family_ties.length) {
  845 + if (data.relationship && data.relationship.length) {
786 846 var older_relativeData = this.data.older_relativeData
787   - older_relativeData.selected = data.family_ties
  847 + older_relativeData.selected = data.relationship
788 848 setData.older_relativeData = older_relativeData
789 849 }
  850 + this.is_single = data.is_single
  851 + this.supporttype = data.is_single=='y'? 'D': 'S'
  852 + this.share_method = data.share_method
790 853 this.setData(setData)
791 854 break;
792   - case 'medical_fund':
793   - var setData = {}
794   - if (data.name && data.name.length) {
795   - setData.name = data.name
796   - }
797   - if (data.id_card_no && data.id_card_no.length) {
798   - setData.id_card_no = data.id_card_no
799   - this.dealIdInfo(data.id_card_no, 'medical_id_card_no_input')
800   - }
801   - if (data.family_ties && data.family_ties.length) {
802   - var taxperson_relativeData = this.data.taxperson_relativeData
803   - taxperson_relativeData.selected = data.family_ties
804   - setData.taxperson_relativeData = taxperson_relativeData
805   - }
806   - if (data.patient_birthday && data.patient_birthday > 0) {
807   - var commonbirthDate = this.data.commonbirthDate
808   - commonbirthDate.selected = format.formatTime_date(data.patient_birthday)
809   - commonbirthDate.datelong = data.birth_date
810   - setData.commonbirthDate = commonbirthDate
811   - }
812   - this.setData(setData)
813   - break;
  855 +
  856 + // case 'medical_fund':
  857 + // var setData = {}
  858 + // var commonbirthDate = this.data.commonbirthDate
  859 + // commonbirthDate.selected = format.formatTime_date(data.patient_birthday)
  860 + // commonbirthDate.datelong = data.patient_birthday
  861 + // setData.commonbirthDate = commonbirthDate
  862 + // if (data.name && data.name.length) {
  863 + // setData.name = data.name
  864 + // }
  865 + // if (data.id_card_no && data.id_card_no.length) {
  866 + // setData.id_card_no = data.id_card_no
  867 + // this.dealIdInfo(data.id_card_no, 'medical_id_card_no_input')
  868 + // }
  869 + // if (data.family_ties && data.family_ties.length) {
  870 + // var taxperson_relativeData = this.data.taxperson_relativeData
  871 + // taxperson_relativeData.selected = data.family_ties
  872 + // setData.taxperson_relativeData = taxperson_relativeData
  873 + // }
  874 + // this.setData(setData)
  875 + // break;
814 876 case "house_fund":
815 877 var setData = {}
  878 + var hasLoverData = this.data.hasLoverData
  879 + hasLoverData.selected = data.has_spouse == 'y'?'是':'否'
  880 + hasLoverData.disabled = data.has_spouse == 'y' ? true : false
  881 + setData.hasLover = data.has_spouse=='y'?true:false
  882 + setData.hasGetLover = data.has_spouse == 'y' ? true : false
  883 + setData.hasLoverData = hasLoverData
816 884 if (data.spouse_name && data.spouse_name.length) {
817 885 setData.spouse_name = data.spouse_name
818 886 }
819   - if (data.spouse_id_card_no && data.spouse_id_card_no.length) {
820   - setData.spouse_id_card_no = data.spouse_id_card_no
  887 + if (data.id_card_no && data.id_card_no.length) {
  888 + setData.spouse_id_card_no = data.id_card_no
821 889 this.dealIdInfo(data.id_card_no, 'spouse_id_card_no_input')
822 890 }
823   - if (this.data.loverbirthDate.selected.length) {
824   - var loverbirthDate = this.data.loverbirthDate
825   - loverbirthDate.selected = format.formatTime_date(data.spouse_birthday)
826   - loverbirthDate.datelong = data.spouse_birthday
827   - setData.loverbirthDate = loverbirthDate
828   - }
829   - if (data.loan_type && data.loan_type.length) {
830   - var loantypeData = this.data.loantypeData
831   - loantypeData.selected = data.loan_type
832   - setData.loantypeData = loantypeData
833   - }
834   - if (data.house_detail_address && data.house_detail_address.length) {
  891 + if (this.data.house_type == 'house_fund_rent'){
  892 + var workingcityInfo = this.data.workingcityInfo
  893 + workingcityInfo.requestdata = data.work_city
  894 + workingcityInfo.selected = data.work_city.province + data.work_city.city
  895 + workingcityInfo.address_value = [data.work_city.province, data.work_city.city, data.work_city.district]
  896 + workingcityInfo.address_code = [data.work_city.province_code, data.work_city.city_code, data.work_city.district_code]
  897 + setData.workingcityInfo = workingcityInfo
  898 + this.getCityLevel({
  899 + 'province_code': workingcityInfo.address_code[0],
  900 + 'province': workingcityInfo.address_value[0],
  901 + 'city_code': workingcityInfo.address_code[1],
  902 + 'city': workingcityInfo.address_value[1],
  903 + 'district_code': workingcityInfo.address_code[2],
  904 + 'district': workingcityInfo.address_value[2]
  905 + })
  906 + var leasetype_Data = this.data.leasetypeData
  907 + leasetype_Data.selected = data.owner_type
  908 + this.data.cardtypeData.hidden = data.owner_type == "企业"
  909 + setData.leasetypeData = leasetype_Data,
  910 + setData.cardtypeData = this.data.cardtypeData
  911 + setData.owner_name = data.owner_name
  912 + setData.owner_credit_no = data.owner_credit_no
  913 +
  914 + if (data.house_address && data.house_address.province) {
  915 + var rentLocateInfo = this.data.rentLocateInfo
  916 + rentLocateInfo.requestdata = data.house_address
  917 + rentLocateInfo.selected = data.house_address.province + data.house_address.city + data.house_address.district
  918 + rentLocateInfo.address_value = [data.house_address.province, data.house_address.city, data.house_address.district]
  919 + rentLocateInfo.address_code = [data.house_address.province_code, data.house_address.city_code, data.house_address.district_code]
  920 + setData.rentLocateInfo = rentLocateInfo
  921 + }
835 922 setData.house_detail_address = data.house_detail_address
836   - }
837   - if (data.certification_no && data.certification_no.length) {
838   - setData.certification_no = data.certification_no
839   - }
840   - if (data.certification_type && data.certification_type.length) {
841   - var identifytypeData = this.data.identifytypeData
842   - identifytypeData.selected = data.certification_type
843   - setData.identifytypeData = identifytypeData
844   - }
845   - if (data.loan_before_marry && data.loan_before_marry.length) {
846   - var beforemarryData = this.data.beforemarryData
847   - beforemarryData.selected = data.loan_before_marry
848   - setData.beforemarryData = beforemarryData
849   - }
850   - if (data.loan_by_self && data.loan_by_self.length) {
851   - var isselfData = this.data.isselfData
852   - isselfData.selected = data.loan_by_self
853   - setData.isselfData = isselfData
854   - }
855   - if (data.loan_contract_no && data.loan_contract_no.length) {
856   - setData.loan_contract_no = data.loan_contract_no
857   - }
858   - if (data.rent_contract_no && data.rent_contract_no.length) {
859 923 setData.rent_contract_no = data.rent_contract_no
860   - }
861   - if (data.rent_start && data.rent_start.length) {
  924 +
862 925 var leasestartDate = this.data.leasestartDate
863 926 leasestartDate.selected = format.formatTime_date(data.rent_start)
864 927 leasestartDate.datelong = data.rent_start
865 928 setData.leasestartDate = leasestartDate
866   - }
867   - if (data.rent_end && data.rent_end.length) {
868 929 var leaseendDate = this.data.leaseendDate
869 930 leaseendDate.selected = format.formatTime_date(data.rent_end)
870 931 leaseendDate.datelong = data.rent_end
871 932 setData.leaseendDate = leaseendDate
  933 + setData.owner_id_card_no = data.owner_id_card_no
  934 +
  935 + } else if (this.data.house_type == 'house_fund_loan'){
  936 +
  937 + if (data.house_address && data.house_address.province) {
  938 + var houseLocateInfo = this.data.houseLocateInfo
  939 + houseLocateInfo.requestdata = data.house_address
  940 + houseLocateInfo.selected = data.house_address.province + data.house_address.city + data.house_address.district
  941 + houseLocateInfo.address_value = [data.house_address.province, data.house_address.city, data.house_address.district]
  942 + houseLocateInfo.address_code = [data.house_address.province_code, data.house_address.city_code, data.house_address.district_code]
  943 + setData.houseLocateInfo = houseLocateInfo
  944 + }
  945 + if (data.house_detail_address && data.house_detail_address.length) {
  946 + setData.house_detail_address = data.house_detail_address
  947 + }
  948 + if (data.certification_type && data.certification_type.length) {
  949 + var identifytypeData = this.data.identifytypeData
  950 + identifytypeData.selected = data.certification_type
  951 + setData.identifytypeData = identifytypeData
  952 + }
  953 + if (data.certification_no && data.certification_no.length) {
  954 + setData.certification_no = data.certification_no
  955 + }
  956 + if (data.loan_before_marry && data.loan_before_marry.length) {
  957 + var beforemarryData = this.data.beforemarryData
  958 + beforemarryData.selected = data.loan_before_marry=='y'?'是':'否'
  959 + setData.beforemarryData = beforemarryData
  960 + }
  961 + if (data.loan_by_self && data.loan_by_self.length) {
  962 + var isselfData = this.data.isselfData
  963 + isselfData.selected = data.loan_by_self == 'y' ? '是' : '否'
  964 + setData.isselfData = isselfData
  965 + }
  966 +
  967 + if (data.loan_type && data.loan_type.length) {
  968 + var loantypeData = this.data.loantypeData
  969 + loantypeData.selected = data.loan_type
  970 + setData.loantypeData = loantypeData
  971 + }
  972 + if (data.loan_contract_no && data.loan_contract_no.length) {
  973 + setData.loan_contract_no = data.loan_contract_no
  974 + }
  975 + if (data.loan_bank && data.loan_bank.length) {
  976 + var bank_data = this.data.bankInfo
  977 + bank_data.selected = data.loan_bank
  978 + setData.bankInfo = bank_data
  979 + }
  980 + var firstpayback_Date = this.data.firstpaybackDate
  981 + firstpayback_Date.selected = format.formatTime_date(data.loan_start)
  982 + firstpayback_Date.datelong = data.loan_start
  983 + setData.firstpaybackDate = firstpayback_Date
  984 + if (data.loan_months>0){
  985 + setData.loan_months = data.loan_months
  986 + }
  987 + if (data.sec_loan_contract_no && data.sec_loan_contract_no.length) {
  988 + setData.sec_loan_contract_no = data.sec_loan_contract_no
  989 + }
  990 + if (data.sec_loan_bank && data.sec_loan_bank.length) {
  991 + var bank_data = this.data.bankInfo_2
  992 + bank_data.selected = data.sec_loan_bank
  993 + setData.bankInfo_2 = bank_data
  994 + }
  995 + var firstpaybackDate_2 = this.data.firstpaybackDate_2
  996 + firstpaybackDate_2.selected = format.formatTime_date(data.sec_loan_start)
  997 + firstpaybackDate_2.datelong = data.sec_loan_start
  998 + setData.firstpaybackDate_2 = firstpaybackDate_2
  999 + if (data.sec_loan_months > 0) {
  1000 + setData.sec_loan_months = data.sec_loan_months
  1001 + }
  1002 + if (data.rent_contract_no && data.rent_contract_no.length) {
  1003 + setData.rent_contract_no = data.rent_contract_no
  1004 + }
872 1005 }
873   - if (data.work_city && data.work_city.province) {
874   - var workingcityInfo = this.data.workingcityInfo
875   - workingcityInfo.requestdata = data.work_city
876   - workingcityInfo.selected = data.work_city.province + data.work_city.city
877   - setData.workingcityInfo = workingcityInfo
  1006 + this.setData(setData)
  1007 + break;
  1008 + }
  1009 +
  1010 + },
  1011 +
  1012 + handleTransData: function(data) {
  1013 + switch (this.data.cur_index + '') {
  1014 + case 'children_education':
  1015 + var setData = {}
  1016 + var commonbirthDate = this.data.commonbirthDate
  1017 + commonbirthDate.selected = format.formatTime_date(data.birth_date)
  1018 + commonbirthDate.datelong = data.birth_date
  1019 + setData.commonbirthDate = commonbirthDate
  1020 + if (data.id_card_no && data.id_card_no.length) {
  1021 + setData.children_id_card_no = data.id_card_no
  1022 + this.dealIdInfo(data.id_card_no, 'children_id_card_no_input')
878 1023 }
879   - if (this.data.house_type == 'house_fund_loan' && data.house_address && data.house_address.province) {
880   - var houseLocateInfo = this.data.houseLocateInfo
881   - houseLocateInfo.requestdata = data.house_address
882   - houseLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
883   - setData.houseLocateInfo = houseLocateInfo
  1024 + if (data.name && data.name.length) {
  1025 + setData.children_name = data.name
884 1026 }
885   - if (this.data.house_type == 'house_fund_rent' && data.house_address && data.house_address.province) {
886   - var rentLocateInfo = this.data.rentLocateInfo
887   - rentLocateInfo.requestdata = data.house_address
888   - rentLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
889   - setData.rentLocateInfo = rentLocateInfo
  1027 + this.setData(setData)
  1028 + break;
  1029 + case 'support_duty':
  1030 + var setData = {}
  1031 + var olderbirthDate = this.data.olderbirthDate
  1032 + olderbirthDate.selected = format.formatTime_date(data.birth_date)
  1033 + olderbirthDate.datelong = data.birth_date
  1034 + setData.olderbirthDate = olderbirthDate
  1035 + if (data.name && data.name.length) {
  1036 + setData.supported_name = data.name
  1037 + }
  1038 + if (data.id_card_no && data.id_card_no.length) {
  1039 + setData.id_card_no = data.id_card_no
  1040 + this.dealIdInfo(data.id_card_no, 'older_id_card_no_input')
  1041 + }
  1042 + this.setData(setData)
  1043 + break;
  1044 + case 'medical_fund':
  1045 + var setData = {}
  1046 + var commonbirthDate = this.data.commonbirthDate
  1047 + commonbirthDate.selected = format.formatTime_date(data.patient_birthday)
  1048 + commonbirthDate.datelong = data.patient_birthday
  1049 + setData.commonbirthDate = commonbirthDate
  1050 + if (data.name && data.name.length) {
  1051 + setData.name = data.name
  1052 + }
  1053 + if (data.id_card_no && data.id_card_no.length) {
  1054 + setData.id_card_no = data.id_card_no
  1055 + this.dealIdInfo(data.id_card_no, 'medical_id_card_no_input')
  1056 + }
  1057 + if (data.family_ties && data.family_ties.length) {
  1058 + var taxperson_relativeData = this.data.taxperson_relativeData
  1059 + taxperson_relativeData.selected = data.family_ties
  1060 + setData.taxperson_relativeData = taxperson_relativeData
890 1061 }
891   -
892 1062 this.setData(setData)
893 1063 break;
  1064 +
894 1065 }
895 1066
896 1067 },
... ... @@ -964,6 +1135,9 @@ Page({
964 1135 children_name: id_info.name,
965 1136 commonbirthDate: that.data.commonbirthDate
966 1137 }
  1138 + if (format.getAge(birth_day) < 3) {
  1139 + that.showToast('子女年龄小于3岁,不可申报')
  1140 + }
967 1141 } else if (that.idcard_belong == 'spouse_id_card_no') {
968 1142 that.data.loverbirthDate.selected = birth_day
969 1143 that.data.loverbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
... ... @@ -980,6 +1154,9 @@ Page({
980 1154 supported_name: id_info.name,
981 1155 olderbirthDate: that.data.olderbirthDate
982 1156 }
  1157 + if (format.getAge(birth_day) < 60) {
  1158 + that.showToast('被赡养人年龄不足60岁,不可申报')
  1159 + }
983 1160 } else if (that.idcard_belong == 'medical_id_card_no') {
984 1161 that.data.commonbirthDate.selected = birth_day
985 1162 that.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
... ... @@ -987,6 +1164,12 @@ Page({
987 1164 id_card_no: id_info.id_card_number,
988 1165 commonbirthDate: that.data.commonbirthDate
989 1166 }
  1167 + } else if (that.idcard_belong == 'owner_id_card_no') {
  1168 + console.log('id_info.id_card_number', id_info.id_card_number)
  1169 + data = {
  1170 + owner_id_card_no: id_info.id_card_number,
  1171 + owner_name: id_info.name
  1172 + }
990 1173 }
991 1174 that.setData(data)
992 1175 console.log('-cardtypeData--', that.data.cardtypeData)
... ... @@ -1032,7 +1215,40 @@ Page({
1032 1215 }
1033 1216 })
1034 1217 },
  1218 + getCertificates: function () {
  1219 + var that = this
  1220 + var Authorization = app.globalData.Authorization;
  1221 + var bank_info = that.data.bankInfo
  1222 + wx.request({
  1223 + url: baseUrl + 'persontax/v1/certification-list' ,
  1224 + header: {
  1225 + 'content-type': 'application/json', // 默认值
  1226 + "Authorization": Authorization
  1227 + },
  1228 + success: function (res) {
  1229 + console.log('certification', res)
  1230 + that.profs_cers = res.data.profession_certificates
  1231 + that.major_cers = res.data.major_certificates
1035 1232
  1233 + var certificateDate = that.data.certificateDate
  1234 + if (that.data.edustyleData.selected == "专业技术人员职业资格"){
  1235 + certificateDate.values = that.major_cers
  1236 + } else if (that.data.edustyleData.selected == '技能人员职业资格') {
  1237 + certificateDate.values = that.profs_cers
  1238 + }
  1239 + that.setData({
  1240 + certificateDate: certificateDate
  1241 + })
  1242 +
  1243 + },
  1244 + fail(res) {
  1245 + console.log(res)
  1246 + },
  1247 + complete() {
  1248 + wx.hideLoading()
  1249 + }
  1250 + })
  1251 + },
1036 1252 handleBankinfo: function(data) {
1037 1253 var bank_name = []
1038 1254 for (var i = 0; i < data.length; i++) {
... ... @@ -1057,14 +1273,18 @@ Page({
1057 1273 this.showToast('身份证格式有误')
1058 1274 return
1059 1275 }
1060   - if (!formdata.children_name || formdata.children_name.length < 1) {
1061   - this.showToast('请填写子女姓名')
  1276 + if (format.getAge(this.data.commonbirthDate.selected) < 3) {
  1277 + this.showToast('子女年龄小于3岁,不可申报')
1062 1278 return
1063 1279 }
1064   - if (this.data.commonbirthDate.selected.length < 1) {
1065   - this.showToast('请选择子女出生日期')
  1280 + if (!formdata.children_name || formdata.children_name.length < 1) {
  1281 + this.showToast('请填写子女姓名')
1066 1282 return
1067 1283 }
  1284 + // if (this.data.commonbirthDate.selected.length < 1) {
  1285 + // this.showToast('请选择子女出生日期')
  1286 + // return
  1287 + // }
1068 1288 if (this.data.childrenpercentData.selected.length < 1) {
1069 1289 this.showToast('请选择分配比例')
1070 1290 return
... ... @@ -1081,12 +1301,22 @@ Page({
1081 1301 this.showToast('请选择受教育起始日期')
1082 1302 return
1083 1303 }
1084   - if (this.data.studyenddate.selected.length < 1) {
1085   - this.showToast('请选择受教育终止日期')
  1304 + if (this.data.studyEndDate.selected.length < 1) {
  1305 + this.showToast('请选择受教育时间止')
1086 1306 return
  1307 + }else{
  1308 + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  1309 + if (this.data.studyEndDate.datelong < activedDate) {
  1310 + this.showToast('受教育时间止不符合要求,无法申报')
  1311 + return
  1312 + }
  1313 + if (this.data.studyPeriodDate.selected.length > 0 && this.data.studyPeriodDate.datelong < activedDate) {
  1314 + this.showToast('教育终止时间不符合要求,无法申报')
  1315 + return
  1316 + }
1087 1317 }
1088 1318 if (!formdata.school_name || formdata.school_name.length < 1) {
1089   - this.showToast('请选择就读学校')
  1319 + this.showToast('请填写就读学校')
1090 1320 return
1091 1321 }
1092 1322 if (this.data.hasLoverData.selected.length < 1) {
... ... @@ -1108,19 +1338,20 @@ Page({
1108 1338 this.showToast('请选择配偶出生日期')
1109 1339 return
1110 1340 }
  1341 + newdata.spouse_id_card_type = '1' //this.data.lovercardtypeData.selected
  1342 + newdata.spouse_birthday = this.data.loverbirthDate.datelong
1111 1343 }
1112 1344 newdata.has_spouse = this.data.hasLover?'y':'n'
1113 1345 newdata.relationship = this.data.taxperson_relativeData.selected
1114 1346 newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%",""))
1115 1347 newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected
1116 1348 newdata.children_birthday = this.data.commonbirthDate.datelong
1117   - newdata.education_end = this.data.studyenddate.datelong
  1349 + newdata.education_period_end = this.data.studyPeriodDate.datelong
  1350 + newdata.education_end = this.data.studyEndDate.datelong
1118 1351 newdata.education_start = this.data.studystartdate.datelong
1119 1352 newdata.education_period = this.data.childedudegreeData.selected
1120 1353 newdata.school_country = this.data.schoolCountryData.selected
1121 1354 newdata.children_nation = "中国"
1122   - newdata.spouse_id_card_type = '1' //this.data.lovercardtypeData.selected
1123   - newdata.spouse_birthday = this.data.loverbirthDate.datelong > 0 ? this.data.loverbirthDate.datelong : 0
1124 1355 newdata.nation = "中国"
1125 1356 break;
1126 1357 case 'continuing_education':
... ... @@ -1135,15 +1366,21 @@ Page({
1135 1366 return
1136 1367 }
1137 1368 if (this.data.studystartdate.selected.length < 1) {
1138   - this.showToast('请选择入学时间')
  1369 + this.showToast('请选择入学时间')
1139 1370 return
1140 1371 }
1141   - if (this.data.studyenddate.selected.length < 1) {
1142   - this.showToast('请选择受毕业时间')
  1372 + if (this.data.studyEndDate.selected.length < 1) {
  1373 + this.showToast('请选择毕业时间')
1143 1374 return
  1375 + } else {
  1376 + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  1377 + if (this.data.studyEndDate.datelong < activedDate) {
  1378 + this.showToast('毕业日期不符合要求,无法申报')
  1379 + return
  1380 + }
1144 1381 }
1145 1382 newdata.education_start = this.data.studystartdate.datelong
1146   - newdata.education_end = this.data.studyenddate.datelong
  1383 + newdata.education_end = this.data.studyEndDate.datelong
1147 1384 newdata.education_type = 'title' //学历
1148 1385 newdata.education_period = this.data.edulevelData.selected
1149 1386 } else if (this.data.edu_lable == 'tech') {
... ... @@ -1154,11 +1391,23 @@ Page({
1154 1391 if (this.data.applydate.selected.length < 1) {
1155 1392 this.showToast('请选择发证日期')
1156 1393 return
  1394 + } else {
  1395 + // var d = new Date();
  1396 + // var curYear = d.getFullYear();
  1397 + var selYear = this.data.applydate.selected.substring(0, 4);
  1398 + if (selYear < 2019) {
  1399 + this.showToast('发证(批准)日期须在2019年度内')
  1400 + return
  1401 + }
1157 1402 }
1158   - if (!formdata.certification_name || formdata.certification_name.length < 1) {
1159   - this.showToast('请填写证书名称')
  1403 + // if (!formdata.certification_name || formdata.certification_name.length < 1) {
  1404 + // this.showToast('请填写证书名称')
  1405 + // return
  1406 + // }
  1407 + if (this.data.certificateDate.selected.length < 1) {
  1408 + this.showToast('请选择证书名称')
1160 1409 return
1161   - }
  1410 + }
1162 1411 if (!formdata.certification_no || formdata.certification_no.length < 1) {
1163 1412 this.showToast('请填写证书编号')
1164 1413 return
... ... @@ -1171,6 +1420,7 @@ Page({
1171 1420 // newdata.edu_type_lable = '1'
1172 1421 newdata.approval_date = this.data.applydate.datelong
1173 1422 newdata.education_type = this.data.edustyleData.selected == '技能人员职业资格' ? 'profession' : 'major'
  1423 + newdata.certification_name = this.data.certificateDate.selected
1174 1424 }
1175 1425 break;
1176 1426 case 'support_duty':
... ... @@ -1199,8 +1449,12 @@ Page({
1199 1449 this.showToast('被赡养人身份证格式有误')
1200 1450 return
1201 1451 }
1202   - if (this.data.olderbirthDate.selected.length < 1) {
1203   - this.showToast('请选择被赡养人出生日期')
  1452 + // if (this.data.olderbirthDate.selected.length < 1) {
  1453 + // this.showToast('请选择被赡养人出生日期')
  1454 + // return
  1455 + // }
  1456 + if (format.getAge(this.data.olderbirthDate.selected) < 60) {
  1457 + this.showToast('被赡养人年龄不足60岁,不可申报')
1204 1458 return
1205 1459 }
1206 1460 if (this.data.older_relativeData.selected.length < 1) {
... ... @@ -1271,10 +1525,11 @@ Page({
1271 1525 if (this.data.house_type == "house_fund_loan") {
1272 1526 newdata.type = 'loan'
1273 1527
1274   - if (this.data.houseLocateInfo.address_value[0].length < 1) {
1275   - this.showToast('请选择住房地址')
1276   - return
1277   - } else if (!formdata.house_detail_address || formdata.house_detail_address.length < 1) {
  1528 + // if (this.data.houseLocateInfo.address_value[0].length < 1) {
  1529 + // this.showToast('请选择住房地址')
  1530 + // return
  1531 + // } else
  1532 + if (!formdata.house_detail_address || formdata.house_detail_address.length < 1) {
1278 1533 this.showToast('请填写房屋详细地址')
1279 1534 return
1280 1535 }if (this.data.identifytypeData.selected.length < 1) {
... ... @@ -1305,7 +1560,7 @@ Page({
1305 1560 this.showToast('请选择首次还款日期')
1306 1561 return
1307 1562 } else if (!formdata.loan_months || formdata.loan_months.length < 1) {
1308   - this.showToast('请选择公积金贷款期限')
  1563 + this.showToast('请填写公积金贷款期限')
1309 1564 return
1310 1565 }
1311 1566 newdata.loan_bank = this.data.bankInfo.selected
... ... @@ -1323,7 +1578,7 @@ Page({
1323 1578 this.showToast('请选择首次还款日期')
1324 1579 return
1325 1580 } else if (!formdata.sec_loan_months || formdata.sec_loan_months.length < 1) {
1326   - this.showToast('请选择商业贷款期限')
  1581 + this.showToast('请填写商业贷款期限')
1327 1582 return
1328 1583 }
1329 1584 newdata.sec_loan_bank = this.data.bankInfo_2.selected
... ... @@ -1369,22 +1624,33 @@ Page({
1369 1624 }
1370 1625 newdata.owner_id_card_type = '1'//this.data.cardtypeData.selected
1371 1626 }
1372   - if (this.data.rentLocateInfo.address_value[0].length < 1) {
1373   - this.showToast('请选择房屋地址')
1374   - return
1375   - } else if (!formdata.house_detail_address || formdata.house_detail_address.length < 1) {
  1627 + // if (this.data.rentLocateInfo.address_value[0].length < 1) {
  1628 + // this.showToast('请选择房屋地址')
  1629 + // return
  1630 + // } else
  1631 + if (!formdata.house_detail_address || formdata.house_detail_address.length < 1) {
1376 1632 this.showToast('请填写房屋详细地址')
1377 1633 return
1378   - }else if (!formdata.rent_contract_no || formdata.rent_contract_no.length < 1) {
1379   - this.showToast('请填写租赁合同编号')
1380   - return
1381   - } else if (this.data.leasestartDate.selected.length < 1) {
1382   - this.showToast('请选择日期')
  1634 + }
  1635 + // else if (!formdata.rent_contract_no || formdata.rent_contract_no.length < 1) {
  1636 + // this.showToast('请填写租赁合同编号')
  1637 + // return
  1638 + // } else
  1639 + if (this.data.leasestartDate.selected.length < 1) {
  1640 + this.showToast('请选择租赁起始日期')
1383 1641 return
1384   - } else if (this.data.leaseendDate.selected.length < 1) {
1385   - this.showToast('请选择日期')
  1642 + }
  1643 + if (this.data.leaseendDate.selected.length < 1) {
  1644 + this.showToast('请选择租赁终止日期')
1386 1645 return
  1646 + } else {
  1647 + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  1648 + if (this.data.leaseendDate.datelong < activedDate) {
  1649 + this.showToast('终止日期不符合要求,无法申报')
  1650 + return
  1651 + }
1387 1652 }
  1653 +
1388 1654 newdata.owner_type = this.data.leasetypeData.selected
1389 1655 newdata.rent_start = this.data.leasestartDate.datelong
1390 1656 newdata.rent_end = this.data.leaseendDate.datelong
... ... @@ -1394,7 +1660,6 @@ Page({
1394 1660 var request_rent_address = this.getRentAddressRequest()
1395 1661 newdata.house_address = request_rent_address
1396 1662 console.log('request_working_address', request_working_address)
1397   - newdata.nation = "中国"
1398 1663 }
1399 1664 if (this.data.hasLoverData.selected.length < 1) {
1400 1665 this.showToast('请选择是否有配偶')
... ... @@ -1414,11 +1679,12 @@ Page({
1414 1679 this.showToast('请选择配偶出生日期')
1415 1680 return
1416 1681 }
  1682 + newdata.id_card_no = newdata.spouse_id_card_no ? newdata.spouse_id_card_no : ''
  1683 + newdata.id_card_type = '1' //this.data.lovercardtypeData.selected
  1684 + newdata.birthday = this.data.loverbirthDate.datelong
  1685 + newdata.nation = "中国"
1417 1686 }
1418 1687 newdata.has_spouse = this.data.hasLover ? 'y' : 'n'
1419   - newdata.id_card_no = newdata.spouse_id_card_no ? newdata.spouse_id_card_no:''
1420   - newdata.id_card_type = '1' //this.data.lovercardtypeData.selected
1421   - newdata.birthday = this.data.loverbirthDate.datelong > 0 ? this.data.loverbirthDate.datelong : 0
1422 1688 break;
1423 1689 }
1424 1690
... ... @@ -1430,49 +1696,57 @@ Page({
1430 1696 // this.showToast('请填写扣除金额')
1431 1697 // return
1432 1698 // }
1433   - if (this.data.cur_index != 'medical_fund') {
  1699 + if (this.data.cur_index != 'medical_fund' && this.data.cur_index != 'continuing_education') {
1434 1700 newdata.deduction_type = this.data.reducetypeData.selected == '月度' ? "month" : "year"
1435 1701 newdata.deduction_amount = this.data.deduction_amount //formdata.reduce_money
1436 1702 }
1437 1703 newdata.legal_entity_id = this.legal_entity_id
1438 1704 newdata.legal_entity = this.legal_entity
  1705 + if (this.isEdit) {
  1706 + newdata.id = this.edit_id
  1707 + }
1439 1708 console.log("newdata", newdata);
1440 1709 this.addDatas(newdata, subUrl)
1441 1710 },
1442 1711
1443 1712 addDatas: function(newdata, subUrl) {
1444   - wx.showModal({
1445   - title: '确认要提交申报吗?',
1446   - content: '确认后将不能修改',
1447   - showCancel: true,
1448   - confirmColor: '#357AEB',
1449   - cancelColor: '#999',
1450   - success: function(res) {
1451   - if (res.confirm) {
1452   - var that = this;
1453   - var Authorization = app.globalData.Authorization;
1454   - wx.request({
1455   - url: baseUrl + subUrl,
1456   - method: "POST",
1457   - header: {
1458   - 'content-type': 'application/json',
1459   - "Authorization": Authorization
1460   - },
1461   - data: newdata,
1462   - success(res) {
1463   - if (res && res.statusCode < 300) {
1464   - wx.navigateBack({
1465   - delta: 1
1466   - })
1467   - }else{
1468   - wx.showToast({
1469   - title: res.data.message ? res.data.message:'请求出错',
1470   - icon:'none'
1471   - })
1472   - }
1473   - }
  1713 + // wx.showModal({
  1714 + // title: '确认要提交申报吗?',
  1715 + // content: '确认后将不能修改',
  1716 + // showCancel: true,
  1717 + // confirmColor: '#357AEB',
  1718 + // cancelColor: '#999',
  1719 + // success: function(res) {
  1720 + // if (res.confirm) {
  1721 + // ///接口
  1722 + // } else if (res.cancel) {}
  1723 + // }
  1724 + // })
  1725 + var that = this;
  1726 + var Authorization = app.globalData.Authorization;
  1727 + wx.showLoading()
  1728 + wx.request({
  1729 + url: baseUrl + subUrl,
  1730 + method: "POST",
  1731 + header: {
  1732 + 'content-type': 'application/json',
  1733 + "Authorization": Authorization
  1734 + },
  1735 + data: newdata,
  1736 + success(res) {
  1737 + if (res && res.statusCode < 300) {
  1738 + wx.navigateBack({
  1739 + delta: 1
1474 1740 })
1475   - } else if (res.cancel) {}
  1741 + } else {
  1742 + wx.showToast({
  1743 + title: res.data.message ? res.data.message : '请求出错',
  1744 + icon: 'none'
  1745 + })
  1746 + }
  1747 + },
  1748 + complete(){
  1749 + wx.hideLoading()
1476 1750 }
1477 1751 })
1478 1752 },
... ... @@ -1517,26 +1791,38 @@ Page({
1517 1791 }
1518 1792 },
1519 1793 loan_input: function (e) {
1520   - console.log('-------', e.detail.value)
  1794 + var value = e.detail.value
1521 1795 switch (e.currentTarget.id) {
1522 1796 case 'loan_contract_no':
1523 1797 this.setData({
1524   - loan_contract_no: e.detail.value
  1798 + loan_contract_no: value
1525 1799 })
1526 1800 break;
1527 1801 case 'loan_months':
  1802 + if (value.length && value <= 0) {
  1803 + value = 1
  1804 + } else if (value > 240) {
  1805 + value = 240
  1806 + this.showToast('月数不得大于240')
  1807 + }
1528 1808 this.setData({
1529   - loan_months: e.detail.value
  1809 + loan_months: value
1530 1810 })
1531 1811 break;
1532 1812 case 'sec_loan_contract_no':
1533 1813 this.setData({
1534   - sec_loan_contract_no: e.detail.value
  1814 + sec_loan_contract_no: value
1535 1815 })
1536 1816 break;
1537 1817 case 'sec_loan_months':
  1818 + if (value.length && value <= 0) {
  1819 + value = 1
  1820 + }else if (value>240){
  1821 + value = 240
  1822 + this.showToast('月数不得大于240')
  1823 + }
1538 1824 this.setData({
1539   - sec_loan_months: e.detail.value
  1825 + sec_loan_months: value
1540 1826 })
1541 1827 break;
1542 1828 }
... ... @@ -1552,6 +1838,9 @@ Page({
1552 1838 data = {
1553 1839 commonbirthDate: this.data.commonbirthDate
1554 1840 }
  1841 + if (info.age<3){
  1842 + this.showToast('子女年龄小于3岁,不可申报')
  1843 + }
1555 1844 } else if (idcard_belong == 'spouse_id_card_no_input') {
1556 1845 this.data.loverbirthDate.selected = info.birthDay
1557 1846 this.data.loverbirthDate.datelong = (Date.parse(new Date(info.birthDay)) / 1000)
... ... @@ -1570,6 +1859,9 @@ Page({
1570 1859 data = {
1571 1860 olderbirthDate: this.data.olderbirthDate
1572 1861 }
  1862 + if (info.age < 60) {
  1863 + this.showToast('被赡养人年龄不足60岁,不可申报')
  1864 + }
1573 1865 } else if (idcard_belong == 'owner_id_card_no_input') {
1574 1866 // this.data.olderbirthDate.selected = info.birthDay
1575 1867 // this.data.olderbirthDate.datelong = (Date.parse(new Date(info.birthDay)) / 1000)
... ... @@ -1598,11 +1890,11 @@ Page({
1598 1890 // })
1599 1891 // } else if (e.currentTarget.id == 'study_end_date') {
1600 1892 // console.log('study_end_date')
1601   - // var study_enddate = this.data.studyenddate
  1893 + // var study_enddate = this.data.studyEndDate
1602 1894 // study_enddate.start = '1970-01-01'
1603 1895 // study_enddate.end = ''
1604 1896 // this.setData({
1605   - // studyenddate: study_enddate
  1897 + // studyEndDate: study_enddate
1606 1898 // })
1607 1899 // }
1608 1900 // },
... ... @@ -1680,20 +1972,67 @@ Page({
1680 1972 })
1681 1973 break;
1682 1974 case 'study_start_date':
  1975 + var select_date = e.detail.value
1683 1976 var study_startdate = this.data.studystartdate
1684   - study_startdate.selected = e.detail.value
1685   - study_startdate.datelong = (Date.parse(new Date(e.detail.value)) / 1000)
  1977 + study_startdate.selected = select_date
  1978 + study_startdate.datelong = (Date.parse(new Date(select_date)) / 1000)
  1979 + //处理两个终止时间的限制
  1980 + var select_year = select_date.substring(0, 4)
  1981 + var start = select_date
  1982 + if (select_year<2019){
  1983 + start = '2019-01'
  1984 + }
  1985 + var studyPeriodDate = this.data.studyPeriodDate
  1986 + studyPeriodDate.start = start
  1987 + studyPeriodDate.selected = ''
  1988 + studyPeriodDate.datelong = null
  1989 + var study_enddate = this.data.studyEndDate
  1990 + study_enddate.start = start
  1991 + study_enddate.selected = ''
1686 1992 this.setData({
1687   - studystartdate: study_startdate
  1993 + studystartdate: study_startdate,
  1994 + studyPeriodDate: studyPeriodDate,
  1995 + studyEndDate: study_enddate
1688 1996 })
1689 1997 break;
1690 1998 case 'study_end_date':
1691   - var study_enddate = this.data.studyenddate
  1999 + var study_enddate = this.data.studyEndDate
1692 2000 study_enddate.selected = e.detail.value
1693   - study_enddate.datelong = (Date.parse(new Date(e.detail.value)) / 1000)
  2001 + var datelong = (Date.parse(new Date(e.detail.value)) / 1000)
  2002 + study_enddate.datelong = datelong
  2003 +
  2004 + var studyPeriodDate = this.data.studyPeriodDate
  2005 + studyPeriodDate.end = e.detail.value
  2006 + studyPeriodDate.selected = ''
  2007 + studyPeriodDate.datelong = null
  2008 + this.setData({
  2009 + studyPeriodDate: studyPeriodDate,
  2010 + studyEndDate: study_enddate
  2011 + })
  2012 + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  2013 + // if (datelong < activedDate){
  2014 + // this.showToast('教育终止时间不符合要求,无法申报')
  2015 + // }
  2016 + break;
  2017 + case 'study_per_date':
  2018 + var studyPeriodDate = this.data.studyPeriodDate
  2019 + studyPeriodDate.selected = e.detail.value
  2020 + var datelong = (Date.parse(new Date(e.detail.value)) / 1000)
  2021 + studyPeriodDate.datelong = datelong
  2022 + if (datelong > this.data.studyEndDate.datelong) {
  2023 + wx.showToast({
  2024 + title: '教育终止日应不大于受教育时间止',
  2025 + icon:'none'
  2026 + })
  2027 + return
  2028 + }
1694 2029 this.setData({
1695   - studyenddate: study_enddate
  2030 + studyPeriodDate: studyPeriodDate,
1696 2031 })
  2032 + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  2033 + // if (datelong < activedDate) {
  2034 + // this.showToast('受教育时间止不符合要求,无法申报')
  2035 + // }
1697 2036 break;
1698 2037 case 'child_edu_degree':
1699 2038 var childedudegreeData = this.data.childedudegreeData
... ... @@ -1772,27 +2111,38 @@ Page({
1772 2111 edutypee_data.selected = edutypee_data.values[e.detail.value]
1773 2112 var reducetypeData = this.data.reducetypeData
1774 2113 var deduction_amount
1775   - if (e.detail.value == '1') {//非学历教育
1776   - reducetypeData.selected = '年度'
1777   - // reducetypeData.disabled = true
1778   - deduction_amount = Deduce_amounts_year['continuing_education_non']
1779   - }else {
1780   - // reducetypeData.disabled = false
1781   - reducetypeData.selected = '月度'
1782   - deduction_amount = Deduce_amounts_month['continuing_education']
1783   - }
  2114 + // if (e.detail.value == '1') {//非学历教育
  2115 + // reducetypeData.selected = '年度'
  2116 + // // reducetypeData.disabled = true
  2117 + // deduction_amount = Deduce_amounts_year['continuing_education_non']
  2118 + // }else {
  2119 + // // reducetypeData.disabled = false
  2120 + // reducetypeData.selected = '月度'
  2121 + // deduction_amount = Deduce_amounts_month['continuing_education']
  2122 + // }
1784 2123 this.setData({
1785 2124 edu_lable: e.detail.value == 0 ? 'school' : 'tech',
1786 2125 edutypeData: edutypee_data,
1787   - reducetypeData: reducetypeData,
1788   - deduction_amount: deduction_amount
  2126 + // reducetypeData: reducetypeData,
  2127 + // deduction_amount: deduction_amount
1789 2128 })
1790 2129 break;
1791 2130 case 'edu_style':
1792 2131 var edustyle_data = this.data.edustyleData
1793 2132 edustyle_data.selected = edustyle_data.values[e.detail.value]
  2133 + var certificateDate = this.data.certificateDate
  2134 + certificateDate.values = e.detail.value == '0' ? this.profs_cers : this.major_cers
  2135 + certificateDate.selected = ''
1794 2136 this.setData({
1795   - edustyleData: edustyle_data
  2137 + edustyleData: edustyle_data,
  2138 + certificateDate: certificateDate
  2139 + })
  2140 + break;
  2141 + case 'certificate':
  2142 + var certificateDate = this.data.certificateDate
  2143 + certificateDate.selected = certificateDate.values[e.detail.value]
  2144 + this.setData({
  2145 + certificateDate: certificateDate
1796 2146 })
1797 2147 break;
1798 2148 case 'edu_level':
... ... @@ -1810,7 +2160,11 @@ Page({
1810 2160 this.setData({
1811 2161 applydate: apply_date
1812 2162 })
1813   - break;
  2163 + var selYear = apply_date.selected.substring(0, 4);
  2164 + if (selYear < 2019) {
  2165 + this.showToast('发证(批准)日期须在2019年度内')
  2166 + return
  2167 + }
1814 2168 break;
1815 2169 case 'cardtype':
1816 2170 var cardtype_Data = this.data.cardtypeData
... ... @@ -1895,6 +2249,10 @@ Page({
1895 2249 this.setData({
1896 2250 leaseendDate: leaseend_Date
1897 2251 })
  2252 + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  2253 + if (leaseend_Date.datelong < activedDate) {
  2254 + this.showToast('终止日期不符合要求,无法申报')
  2255 + }
1898 2256 break;
1899 2257 case 'bank':
1900 2258 var bank_data = this.data.bankInfo
... ... @@ -1938,6 +2296,14 @@ Page({
1938 2296 }
1939 2297 work_address.address_value = e.detail.value
1940 2298 work_address.address_code = e.detail.code
  2299 + this.getCityLevel({
  2300 + 'province_code': e.detail.code[0],
  2301 + 'province': e.detail.value[0],
  2302 + 'city_code': e.detail.code[1],
  2303 + 'city': e.detail.value[1],
  2304 + 'district_code': e.detail.code[2],
  2305 + 'district': e.detail.value[2]
  2306 + })
1941 2307 this.setData({
1942 2308 workAddress_haschanged: true,
1943 2309 workingcityInfo: work_address
... ... @@ -1954,14 +2320,14 @@ Page({
1954 2320 }
1955 2321 rent_address.address_value = e.detail.value
1956 2322 rent_address.address_code = e.detail.code
1957   - this.getCityLevel({
1958   - 'province_code': e.detail.code[0] ,
1959   - 'province': e.detail.value[0],
1960   - 'city_code': e.detail.code[1] ,
1961   - 'city': e.detail.value[1],
1962   - 'district_code': e.detail.code[2] ,
1963   - 'district': e.detail.value[2]
1964   - })
  2323 + // this.getCityLevel({
  2324 + // 'province_code': e.detail.code[0] ,
  2325 + // 'province': e.detail.value[0],
  2326 + // 'city_code': e.detail.code[1] ,
  2327 + // 'city': e.detail.value[1],
  2328 + // 'district_code': e.detail.code[2] ,
  2329 + // 'district': e.detail.value[2]
  2330 + // })
1965 2331 this.setData({
1966 2332 rentAddress_haschanged: true,
1967 2333 rentLocateInfo: rent_address
... ...
... ... @@ -13,17 +13,17 @@
13 13 <text class='text_777_30 float_left' style='line-height: 90rpx'>子女证照号码</text>
14 14 <view wx:if="{{isIdCard}}">
15 15 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="children_id_card_no"></image>
16   - <input class='input_wrap01 float_right' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}' bindinput="idChange" id='children_id_card_no_input'></input>
  16 + <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}' bindinput="idChange" id='children_id_card_no_input'></input>
17 17 </view>
18 18 <!-- <view wx:else>
19   - <input class='input_wrap float_right' placeholder='请输入证照号码' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}'></input>
  19 + <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}'></input>
20 20 </view> -->
21 21 </view>
22 22 <view class='divide_line_30'></view>
23 23 <view style='height:90rpx'>
24 24 <text class='red_star_right_10'>*</text>
25 25 <text class='text_777_30 float_left'>子女姓名</text>
26   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入子女姓名' name='children_name' value='{{children_name}}'></input>
  26 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入子女姓名' name='children_name' value='{{children_name}}'></input>
27 27 </view>
28 28 <view class='divide_line_30'></view>
29 29 <template is="picker_cell_normal" data="{{...commonbirthDate}}" />
... ... @@ -42,7 +42,7 @@
42 42 <text class='red_star_right_10'>*</text>
43 43 <text class='text_777_30 float_left'>分配比例</text>
44 44 <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
45   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分配比例' type='number' name='percent' value='{{percent}}'></input>
  45 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分配比例' type='number' name='percent' value='{{percent}}'></input>
46 46 </view> -->
47 47 <template is="picker_cell_normal" data="{{...childrenpercentData}}" />
48 48
... ... @@ -50,7 +50,7 @@
50 50 <view style='height:90rpx'>
51 51 <text class='red_star_right_10'>*</text>
52 52 <text class='text_777_30 float_left'>子女学籍号</text>
53   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入子女学籍号' name='children_student_no' value='{{children_student_no}}'></input>
  53 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入子女学籍号' name='children_student_no' value='{{children_student_no}}'></input>
54 54 </view>
55 55 <view class='divide_line_30'></view>
56 56
... ... @@ -60,15 +60,17 @@
60 60 <template is="picker_cell_normal" data="{{...studystartdate}}" />
61 61 <view class='divide_line_30'></view>
62 62
63   - <template is="picker_cell_normal" data="{{...studyenddate}}" />
  63 + <template is="picker_cell_normal" data="{{...studyEndDate}}" />
  64 + <view class='divide_line_30'></view>
64 65
  66 + <template is="picker_cell_normal" data="{{...studyPeriodDate}}" />
65 67 <view class='divide_line_30'></view>
66 68 <template is="picker_cell_normal" data="{{...schoolCountryData}}" />
67 69 <view class='divide_line_30'></view>
68 70 <view style='height:90rpx'>
69 71 <text class='red_star_right_10'>*</text>
70 72 <text class='text_777_30 float_left'>就读学校名称</text>
71   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入就读学校' name='school_name' value='{{school_name}}'></input>
  73 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入就读学校' name='school_name' value='{{school_name}}'></input>
72 74 </view>
73 75 </view>
74 76 </view>
... ... @@ -80,13 +82,13 @@
80 82 <view wx:if="{{edu_lable=='school'}}">
81 83 <!-- <view style='height:90rpx'>
82 84 <text class='text_777_30 float_left'>学历教育阶段</text>
83   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入学历教育阶段' name='education_period'></input>
  85 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入学历教育阶段' name='education_period'></input>
84 86 </view> -->
85 87 <template is="picker_cell_normal" data="{{...edulevelData}}" />
86 88 <view class='divide_line_30'></view>
87 89 <template is="picker_cell_normal" data="{{...studystartdate}}" />
88 90 <view class='divide_line_30'></view>
89   - <template is="picker_cell_normal" data="{{...studyenddate}}" />
  91 + <template is="picker_cell_normal" data="{{...studyEndDate}}" />
90 92
91 93 </view>
92 94 <view wx:elif="{{edu_lable=='tech'}}">
... ... @@ -94,22 +96,23 @@
94 96 <view class='divide_line_30'></view>
95 97 <template is="picker_cell_normal" data="{{...applydate}}" />
96 98 <view class='divide_line_30'></view>
97   - <view style='height:90rpx'>
  99 + <template is="picker_cell_normal" data="{{...certificateDate}}" />
  100 + <!-- <view style='height:90rpx'>
98 101 <text class='red_star_right_10'>*</text>
99 102 <text class='text_777_30 float_left'>证书名称</text>
100   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书名称' name='certification_name'></input>
101   - </view>
  103 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书名称' name='certification_name' value='{{certification_name}}'></input>
  104 + </view> -->
102 105 <view class='divide_line_30'></view>
103 106 <view style='height:90rpx'>
104 107 <text class='red_star_right_10'>*</text>
105 108 <text class='text_777_30 float_left'>证书编号</text>
106   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书编号' name='certification_no'></input>
  109 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书编号' name='certification_no' value='{{certification_no}}'></input>
107 110 </view>
108 111 <view class='divide_line_30'></view>
109 112 <view style='height:90rpx'>
110 113 <text class='red_star_right_10'>*</text>
111 114 <text class='text_777_30 float_left'>发证机关</text>
112   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入发证机关' name='certification_authority'></input>
  115 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入发证机关' name='certification_authority' value='{{certification_authority}}'></input>
113 116 </view>
114 117 </view>
115 118
... ... @@ -122,7 +125,7 @@
122 125 <view style='height:90rpx'>
123 126 <text class='red_star_right_10'>*</text>
124 127 <text class='text_777_30 float_left'>被赡养人姓名</text>
125   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入被赡养人姓名' name='supported_name' value='{{supported_name}}'></input>
  128 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入被赡养人姓名' name='supported_name' value='{{supported_name}}'></input>
126 129 </view>
127 130 <view class='divide_line_30'></view>
128 131 <template is="picker_cell_normal" data="{{...oldercardtypeData}}" />
... ... @@ -132,7 +135,7 @@
132 135 <text class='text_777_30 float_left'>被赡养人证照号码</text>
133 136 <view wx:if="{{isIdCard}}">
134 137 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="older_id_card_no"></image>
135   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:350rpx;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='id_card_no' value='{{id_card_no}}' bindinput="idChange" id="older_id_card_no_input"></input>
  138 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='id_card_no' value='{{id_card_no}}' bindinput="idChange" id="older_id_card_no_input"></input>
136 139 </view>
137 140 </view>
138 141 <view class='divide_line_30'></view>
... ... @@ -150,7 +153,7 @@
150 153 <text class='red_star_right_10'>*</text>
151 154 <text class='text_777_30 float_left'>分摊比例</text>
152 155 <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
153   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分摊比例' type='number' name='percentage' value='{{percentage}}'></input>
  156 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分摊比例' type='number' name='percentage' value='{{percentage}}'></input>
154 157 </view> -->
155 158 </view>
156 159 <!-- 大病医疗 -->
... ... @@ -158,7 +161,7 @@
158 161 <view style='height:90rpx'>
159 162 <text class='red_star_right_10'>*</text>
160 163 <text class='text_777_30 float_left'>病人姓名</text>
161   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入姓名' name='name' value='{{name}}'></input>
  164 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入病人姓名' name='name' value='{{name}}'></input>
162 165 </view>
163 166 <view class='divide_line_30'></view>
164 167
... ... @@ -169,7 +172,7 @@
169 172 <text class='text_777_30 float_left'>病人证照号码</text>
170 173 <view wx:if="{{isIdCard}}">
171 174 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="medical_id_card_no"></image>
172   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:380rpx;color:#000;' placeholder='请输入或拍摄身份证' name='id_card_no' type='idcard' value='{{id_card_no}}' bindinput="idChange" id="medical_id_card_no_input"></input>
  175 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:380rpx;color:#000;' placeholder='请输入或拍摄身份证' name='id_card_no' type='idcard' value='{{id_card_no}}' bindinput="idChange" id="medical_id_card_no_input"></input>
173 176 </view>
174 177 </view>
175 178 <view class='divide_line_30'></view>
... ... @@ -186,13 +189,13 @@
186 189 <view style='height:90rpx'>
187 190 <text class='red_star_right_10'>*</text>
188 191 <text class='text_777_30 float_left'>医疗支出总金额</text>
189   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:200rpx;color:#000;' placeholder='请输入总金额' name='total_amount' value='{{total_amount}}' bindblur='medicalInput' id="medical_total_input"></input>
  192 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:200rpx;color:#000;' placeholder='请输入总金额' name='total_amount' value='{{total_amount}}' bindblur='medicalInput' id="medical_total_input"></input>
190 193 </view>
191 194 <view class='divide_line_30'></view>
192 195 <view style='height:90rpx'>
193 196 <text class='red_star_right_10'>*</text>
194 197 <text class='text_777_30 float_left'>个人负担金额</text>
195   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入金额' name='amount_by_person' value='{{amount_by_person}}' bindblur='medicalInput' id="medical_amount_input"></input>
  198 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入金额' name='amount_by_person' value='{{amount_by_person}}' bindblur='medicalInput' id="medical_amount_input"></input>
196 199 </view>
197 200 </view>
198 201 <!-- 住房 -->
... ... @@ -203,7 +206,7 @@
203 206 <template is="picker_cell_normal" data="{{...houseLocateInfo}}" />
204 207 <view class='divide_line_30'></view>
205 208 <view style='height:90rpx'>
206   - <input class='input_wrap02 float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入详细地址,精确到楼牌号' name='house_detail_address'></input>
  209 + <input class='input_wrap head_in' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入详细地址,精确到楼牌号' name='house_detail_address' value='{{house_detail_address}}'></input>
207 210 </view>
208 211 <view class='divide_line_30'></view>
209 212 <template is="picker_cell_normal" data="{{...identifytypeData}}" />
... ... @@ -211,7 +214,7 @@
211 214 <view style='height:90rpx'>
212 215 <text class='red_star_right_10'>*</text>
213 216 <text class='text_777_30 float_left'>证书号码</text>
214   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书号码' name='certification_no'></input>
  217 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书号码' name='certification_no' value='{{certification_no}}'></input>
215 218 </view>
216 219 <view class='divide_line_30'></view>
217 220
... ... @@ -230,7 +233,7 @@
230 233 <view style='height:90rpx'>
231 234 <text class='red_star_right_10'>*</text>
232 235 <text class='text_777_30 float_left'>公积金贷款合同编号</text>
233   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_contract_no' value='{{loan_contract_no}}' bindinput="loan_input" id='loan_contract_no'></input>
  236 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_contract_no' value='{{loan_contract_no}}' bindinput="loan_input" id='loan_contract_no'></input>
234 237 </view>
235 238 <view class='divide_line_30'></view>
236 239 <template is="picker_cell_normal" data="{{...bankInfo}}" />
... ... @@ -241,7 +244,7 @@
241 244 <view style='height:90rpx'>
242 245 <text class='red_star_right_10'>*</text>
243 246 <text class='text_777_30 float_left'>公积金贷款期限(月数)</text>
244   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='loan_months' value='{{loan_months}}' bindinput="loan_input" id='loan_months' type='number'></input>
  247 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='loan_months' value='{{loan_months}}' bindinput="loan_input" id='loan_months' type='number'></input>
245 248 </view>
246 249 </view>
247 250 <view style='padding:0 30rpx;' wx:if="{{loantypeData.selected == '商业贷款' || loantypeData.selected == '组合贷款' }}">
... ... @@ -249,7 +252,7 @@
249 252 <view style='height:90rpx'>
250 253 <text class='red_star_right_10'>*</text>
251 254 <text class='text_777_30 float_left'>商业贷款合同编号</text>
252   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;width:400rpx;' placeholder='请输入贷款合同编号' name='sec_loan_contract_no' value='{{sec_loan_contract_no}}' bindinput="loan_input" id='sec_loan_contract_no' ></input>
  255 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;width:400rpx;' placeholder='请输入贷款合同编号' name='sec_loan_contract_no' value='{{sec_loan_contract_no}}' bindinput="loan_input" id='sec_loan_contract_no' ></input>
253 256 </view>
254 257 <view class='divide_line_30'></view>
255 258 <template is="picker_cell_normal" data="{{...bankInfo_2}}" />
... ... @@ -260,7 +263,7 @@
260 263 <view style='height:90rpx'>
261 264 <text class='red_star_right_10'>*</text>
262 265 <text class='text_777_30 float_left'>商业贷款期限(月数)</text>
263   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='sec_loan_months' value='{{sec_loan_months}}' bindinput="loan_input" id='sec_loan_months' type='number'></input>
  266 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='sec_loan_months' value='{{sec_loan_months}}' bindinput="loan_input" id='sec_loan_months' type='number'></input>
264 267 </view>
265 268 </view>
266 269 </view>
... ... @@ -274,13 +277,13 @@
274 277 <view style='height:90rpx'>
275 278 <text class='red_star_right_10'>*</text>
276 279 <text class='text_777_30 float_left'>出租方名称</text>
277   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入出租方名称' name='owner_name'></input>
  280 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入出租方名称' name='owner_name' value='{{owner_name}}'></input>
278 281 </view>
279 282 <view class='divide_line_30' hidden="{{leasetypeData.selected == '个人'}}"></view>
280 283 <view style='height:90rpx' hidden="{{leasetypeData.selected == '个人'}}">
281 284 <text class='red_star_right_10'>*</text>
282 285 <text class='text_777_30 float_left'>统一社会信用代码</text>
283   - <input class='input_wrap01 float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:350rpx;color:#000;' placeholder='请输入统一社会信用代码' name='owner_credit_no'></input>
  286 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入统一社会信用代码' name='owner_credit_no' value='{{owner_credit_no}}'></input>
284 287 </view>
285 288 <view class='divide_line_30' hidden="{{leasetypeData.selected == '企业'}}"></view>
286 289 <template is="picker_cell_normal" data="{{...cardtypeData}}"/>
... ... @@ -290,7 +293,7 @@
290 293 <text class='text_777_30 float_left'>证照号码</text>
291 294 <view wx:if="{{isIdCard}}">
292 295 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="owner_id_card_no"></image>
293   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:380rpx;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='owner_id_card_no' value='{{owner_id_card_no}}' bindinput="idChange" id='owner_id_card_no_input'></input>
  296 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style=' line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='owner_id_card_no' value='{{owner_id_card_no}}' bindinput="idChange" id='owner_id_card_no_input'></input>
294 297 </view>
295 298 </view>
296 299 </view>
... ... @@ -299,13 +302,13 @@
299 302 <template is="picker_cell_normal" data="{{...rentLocateInfo}}" />
300 303 <view class='divide_line_30'></view>
301 304 <view style='height:90rpx'>
302   - <input class='input_wrap02 float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: rightcolor:#000;' placeholder='请输入详细地址,精确到楼牌号' name='house_detail_address'></input>
  305 + <input class='input_wrap head_in' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: rightcolor:#000;' placeholder='请输入详细地址,精确到楼牌号' name='house_detail_address' value='{{house_detail_address}}'></input>
303 306 </view>
304 307 <view class='divide_line_30'></view>
305 308 <view style='height:90rpx'>
306   - <text class='red_star_right_10'>*</text>
307   - <text class='text_777_30 float_left'>租赁合同编号</text>
308   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: rightcolor:#000;' placeholder='请输入合同编号' name='rent_contract_no'></input>
  309 + <!-- <text class='red_star_right_10'>*</text> -->
  310 + <text class='text_777_30 float_left head_in'>租赁合同编号</text>
  311 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: rightcolor:#000;' placeholder='请输入合同编号' name='rent_contract_no' value='{{rent_contract_no}}'></input>
309 312 </view>
310 313 <view class='divide_line_30'></view>
311 314 <template is="picker_cell_normal" data="{{...leasestartDate}}" />
... ... @@ -316,7 +319,7 @@
316 319 </view>
317 320 </view>
318 321
319   -<view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund' && cur_index!='support_duty'}}">
  322 +<view style='padding:0 30rpx;' wx:if="{{cur_index=='children_education' || cur_index=='house_fund'}}">
320 323 <view class='divide_line_30'></view>
321 324 <template is="picker_cell_normal" data="{{...reducetypeData}}" />
322 325 <view class='divide_line_30'></view>
... ... @@ -324,9 +327,8 @@
324 327 <text class='text_777_30 float_left head_in'>扣除金额</text>
325 328 <text wx:if="{{reducetypeData.selected=='月度'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;font-family: PingFangSC-Semibold;'>¥{{deduction_amount}}/月</text>
326 329 <text wx:if="{{reducetypeData.selected=='年度'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;font-family: PingFangSC-Semibold;'>¥{{deduction_amount}}/年</text>
327   - <!-- <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#FF9F00;' placeholder='请输入扣除金额' type='digit' name='reduce_money'></input> -->
  330 + <!-- <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#FF9F00;' placeholder='请输入扣除金额' type='digit' name='reduce_money'></input> -->
328 331 </view>
329   - <view class='divide_line_30'></view>
330 332
331 333 </view>
332 334
... ... @@ -336,12 +338,12 @@
336 338
337 339 <view wx:if="{{cur_index=='children_education' || cur_index=='house_fund'}}">
338 340 <template is="picker_cell_normal" data="{{...hasLoverData}}" />
339   - <view class='divide_line_30'></view>
340 341 </view>
341 342 <view wx:if="{{hasLover}}">
  343 + <view class='divide_line_30'></view>
342 344 <view style='height:90rpx'>
343 345 <text class='text_777_30 float_left head_in'>配偶姓名</text>
344   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入配偶姓名' name='spouse_name' value='{{spouse_name}}'></input>
  346 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入配偶姓名' name='spouse_name' value='{{spouse_name}}' disabled='{{hasGetLover}}'></input>
345 347 </view>
346 348 <view class='divide_line_30'></view>
347 349 <template is="picker_cell_normal" data="{{...lovercardtypeData}}" />
... ... @@ -349,8 +351,8 @@
349 351 <view style='height:90rpx'>
350 352 <text class='text_777_30 float_left head_in'>配偶证照号码</text>
351 353 <view wx:if="{{isIdCard}}">
352   - <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="spouse_id_card_no"></image>
353   - <input class='input_wrap01 float_right' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" id='spouse_id_card_no_input'></input>
  354 + <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden='{{hasGetLover}}' id="spouse_id_card_no"></image>
  355 + <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" id='spouse_id_card_no_input' disabled='{{hasGetLover}}'></input>
354 356 </view>
355 357 </view>
356 358 <view class='divide_line_30'></view>
... ...
... ... @@ -32,20 +32,26 @@ Page({
32 32 */
33 33 onLoad: function (options) {
34 34 var that = this
  35 + wx.showLoading({
  36 + title: '',
  37 + })
35 38 console.log("options", options);
36 39 var pages = getCurrentPages();
37 40 //获取上一个页面的所有的方法和data中的数据
38 41 var lastpage = pages[pages.length - 2]
  42 + var info = options.datas ? JSON.parse(options.datas) : {}
  43 +
39 44 console.log("lastpage", lastpage.data);
40 45 // this.handleData(options.datas)
41 46 this.setData({
42 47 cur_status: options.status,
43 48 house_type: lastpage.data.house_type,
44   - datas: options.datas?JSON.parse(options.datas):{}
  49 + datas: info
45 50 })
46 51 wx.setNavigationBarTitle({
47 52 title: that.data.additiontitle[options.status],
48 53 })
  54 +
49 55 },
50 56
51 57 /**
... ... @@ -59,7 +65,7 @@ Page({
59 65 * Lifecycle function--Called when page show
60 66 */
61 67 onShow: function () {
62   -
  68 + wx.hideLoading()
63 69 },
64 70
65 71 /**
... ...
... ... @@ -45,16 +45,21 @@
45 45 <text class='text_right_333'>{{datas.education_start}}</text>
46 46 </view>
47 47 <view style='height:90rpx;width:100%;clear:both;'>
48   - <text class='text_left'>教育终止时间</text>
  48 + <text class='text_left'>受教育期间止</text>
49 49 <text class='text_right_333'>{{datas.education_end}}</text>
50 50 </view>
  51 + <view wx:if="{{datas.education_end&&datas.education_end.length>1}}" style='height:90rpx;width:100%;clear:both;'>
  52 + <text class='text_left'>教育终止时间</text>
  53 + <text class='text_right_333'>{{datas.education_period_end}}</text>
  54 + </view>
51 55 <view style='height:90rpx;width:100%;clear:both;'>
52 56 <text class='text_left'>就读国家(地区)</text>
53 57 <text class='text_right_333'>{{datas.school_country&&datas.school_country.length>0?datas.school_country:'中国(大陆)'}}</text>
54 58 </view>
55   - <view style='height:90rpx;width:100%;clear:both;'>
  59 + <view style='width:100%;clear:both;'>
56 60 <text class='text_left'>就读学校名称</text>
57   - <text class='text_right_333'>{{datas.school_name}}</text>
  61 + <view class='float_right' style='padding:12px 0;font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;max-width:500rpx'>{{datas.school_name}}</view>
  62 + <!-- <text class='text_right_333'>{{datas.school_name}}</text> -->
58 63 </view>
59 64 <!-- <view style='height:90rpx;width:100%'>
60 65 <text class='text_left'>就读国家(地区)</text>
... ... @@ -118,7 +123,7 @@
118 123 </view>
119 124 <view style='height:90rpx;width:100%;clear:both;'>
120 125 <text class='text_left'>被赡养人证照类型</text>
121   - <text class='text_right_333'>{{datas.id_card_type=='1'?"身份证":datas.id_card_type}}</text>
  126 + <text class='text_right_333'>{{datas.id_card_type=='1'?"居民身份证":datas.id_card_type}}</text>
122 127 </view>
123 128 <view style='height:90rpx;width:100%;clear:both;'>
124 129 <text class='text_left'>被赡养人证照号码</text>
... ... @@ -163,9 +168,10 @@
163 168 <text class='text_left'>出租方类型</text>
164 169 <text class='text_right_333'>{{datas.owner_type}}</text>
165 170 </view>
166   - <view style='height:90rpx;width:100%;clear:both;'>
  171 + <view style='width:100%;clear:both;'>
167 172 <text class='text_left'>出租方名称</text>
168   - <text class='text_right_333'>{{datas.owner_name}}</text>
  173 + <view class='float_right' style='padding:12px 0;font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;max-width:500rpx'>{{datas.owner_name}}</view>
  174 + <!-- <text class='text_right_333'>{{datas.owner_name}}</text> -->
169 175 </view>
170 176 <!-- <view style='height:90rpx;width:100%;clear:both;'>
171 177 <view style='height:90rpx;float:left;display:flex;flex-direction:column'>
... ... @@ -196,10 +202,11 @@
196 202 <text class='text_left'>租赁房屋坐落地址</text>
197 203 <text class='text_right_333'>{{datas.house_address_new}}</text>
198 204 </view>
199   - <view wx:if="{{datas.house_detail_address.length>0}}" style='height:90rpx;clear:both;'>
200   - <text class='text_right_333'>{{datas.house_detail_address}}</text>
  205 + <view wx:if="{{datas.house_detail_address.length>0}}" style='clear:both;'>
  206 + <!-- <text class='text_right_333' style='line-height:40rpx;'>{{datas.house_detail_address}}</text> -->
  207 + <view class='float_right' style='padding:12px 0;font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;'>{{datas.house_detail_address}}</view>
201 208 </view>
202   - <view style='height:90rpx;width:100%;clear:both;'>
  209 + <view wx:if="{{datas.rent_contract_no&&datas.rent_contract_no.length>0}}" style='height:90rpx;width:100%;clear:both;'>
203 210 <text class='text_left'>租赁合同编号</text>
204 211 <text class='text_right_333'>{{datas.rent_contract_no}}</text>
205 212 </view>
... ... @@ -225,12 +232,13 @@
225 232 <!-- //贷款 -->
226 233 <view wx:if="{{house_type=='house_fund_loan'}}">
227 234 <view style='padding:0 30rpx'>
228   - <view style='height:90rpx;width:100%;clear:both;'>
  235 + <view wx:if="{{datas.house_address_new&&datas.house_address_new.length>0}}" style='height:90rpx;width:100%;clear:both;'>
229 236 <text class='text_left'>房屋坐落地址</text>
230 237 <text class='text_right_333'>{{datas.house_address_new}}</text>
231 238 </view>
232   - <view wx:if="{{datas.house_detail_address.length>0}}" style='height:90rpx;clear:both;'>
233   - <text class='text_right_333'>{{datas.house_detail_address}}</text>
  239 + <view style='clear:both;'>
  240 + <view class='float_right' style='padding:12px 0;font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;'>{{datas.house_detail_address}}</view>
  241 + <!-- <text class='text_right_333' style='line-height:40rpx;'>{{datas.house_detail_address}}</text> -->
234 242 </view>
235 243 <view style='height:90rpx;width:100%;clear:both;'>
236 244 <text class='text_left'>证书类型</text>
... ... @@ -241,7 +249,7 @@
241 249 <text class='text_right_333'>{{datas.certification_no}}</text>
242 250 </view>
243 251 <view style='height:90rpx;width:100%;clear:both;'>
244   - <text class='text_left'>是否首套婚前贷款且婚后各自扣除:</text>
  252 + <text class='text_left'>是否首套婚前贷款且婚后分别扣除50%</text>
245 253 <text class='text_right_333'>{{datas.loan_before_marry=='y'?"是":"否"}}</text>
246 254 </view>
247 255 <view style='height:90rpx;width:100%;clear:both;'>
... ...
... ... @@ -76,6 +76,7 @@ Page({
76 76 if (selectIndex[index].disable_change) {
77 77 wx.showToast({
78 78 title: '该选项不可修改',
  79 + icon: "none"
79 80 })
80 81 return;
81 82 }
... ... @@ -90,6 +91,7 @@ Page({
90 91 if (selectIndex[selectIndex.length - 1].disable_change) {
91 92 wx.showToast({
92 93 title: '该选项不可修改',
  94 + icon: "none"
93 95 })
94 96 return;
95 97 }
... ... @@ -108,6 +110,7 @@ Page({
108 110 if (selectIndex[selectIndex.length - 1].disable_change) {
109 111 wx.showToast({
110 112 title: '该选项不可修改',
  113 + icon: "none"
111 114 })
112 115 return;
113 116 }
... ... @@ -133,6 +136,7 @@ Page({
133 136 } else {
134 137 wx.showToast({
135 138 title: '请选择住房类型',
  139 + icon:"none"
136 140 })
137 141 return;
138 142 }
... ... @@ -147,6 +151,7 @@ Page({
147 151 if (stuatusarray.length < 1) {
148 152 wx.showToast({
149 153 title: '请选择专项附加扣除',
  154 + icon: "none"
150 155 })
151 156 return;
152 157 }
... ...
... ... @@ -61,7 +61,7 @@ Page({
61 61 console.log("lookandadd", str);
62 62
63 63 wx.navigateTo({
64   - url: 'lookandupdate/lookandupdate?status=' + data[str[0]].addition_items[str[1]].addition_category + "&legal_entity_id=" + data[str[0]].legal_entity_id + "&legal_entity=" + data[str[0]].legal_entity,
  64 + url: 'lookandupdate/lookandupdate?status=' + data[str[0]].addition_items[str[1]].addition_category + "&employee_status=" + data[str[0]].employee_status + "&legal_entity_id=" + data[str[0]].legal_entity_id + "&legal_entity=" + data[str[0]].legal_entity,
65 65 })
66 66 },
67 67
... ... @@ -89,10 +89,10 @@ Page({
89 89 var Authorization = getApp().globalData.Authorization;
90 90 wx.request({
91 91 url: baseUrl + 'persontax/v1/person-additions',
92   - data: {
93   - limit: 10,
94   - offset: 0
95   - },
  92 + // data: {
  93 + // limit: 10,
  94 + // offset: 0
  95 + // },
96 96 header: {
97 97 'content-type': 'application/json',
98 98 "Authorization": Authorization
... ... @@ -101,7 +101,7 @@ Page({
101 101 if (res && res.data) {
102 102 console.log("res", res)
103 103 that.setData({
104   - additionlist: res.data.items
  104 + additionlist: that.handleData(res.data.items)
105 105 })
106 106 }
107 107 wx.hideLoading()
... ... @@ -114,7 +114,30 @@ Page({
114 114 }
115 115 })
116 116 },
117   -
  117 + handleData: function (items) {
  118 + for (var i = 0; i < items.length ; i++){
  119 + var bigItem = items[i]
  120 + for (var j = 0; j < bigItem.addition_items.length; j++) {
  121 + var midItem = bigItem.addition_items[j]
  122 + if (midItem.addition_category == 'continuing_education'){
  123 + var majors = [], professions = []
  124 + for (var k = 0; k < midItem.detail_items.length; k++) {
  125 + var smallItem = midItem.detail_items[k]
  126 + if (smallItem.continue_education_type == 'major'){
  127 + majors.push(smallItem)
  128 + } else if (smallItem.continue_education_type == 'nomajor'){
  129 + professions.push(smallItem)
  130 + }
  131 + }
  132 + items[i].addition_items[j].majors = majors
  133 + items[i].addition_items[j].professions = professions
  134 + break;
  135 + }
  136 + }
  137 + }
  138 + console.log('ddddd', items)
  139 + return items
  140 + },
118 141 /**
119 142 * Lifecycle function--Called when page hide
120 143 */
... ...
... ... @@ -5,7 +5,7 @@
5 5 <view wx:for="{{additionlist}}" wx:key="" style='display:flex;flex-direction:column' wx:for-index="idx01" wx:for-item="item">
6 6 <view style='margin:30rpx 44rpx;float:left;display:flex;flex-direction:column'>
7 7 <text class=' text_333_40 float_left'>{{item.legal_entity}}</text>
8   - <view wx:if="{{item.status=='init'&&item.addition_items.length<1}}" class='view_godeclare_wrap' bindtap='godeclare' id='{{idx01}}'>
  8 + <view wx:if="{{item.employee_status!='inactive'&&item.addition_items.length<1&&item.status=='init'}}" class='view_godeclare_wrap' bindtap='godeclare' id='{{idx01}}'>
9 9 <!-- <view wx:if="{{item.status=='to_declare'}}" class='view_godeclare_wrap' bindtap='godeclare' id='{{idx01}}'> -->
10 10 立即申报
11 11 </view>
... ... @@ -22,7 +22,40 @@
22 22 <text class='text_999_28' style='margin-bottom:8rpx;float:right'>查看</text>
23 23 </view>
24 24 <view wx:if="{{itemData.addition_category=='continuing_education'&&itemData.detail_items.length>0}}" style='padding:20rpx'>
25   - <view wx:for="{{itemData.detail_items}}" wx:key="" wx:for-item="itemtypedetail">
  25 + <view wx:for="{{itemData.majors}}" wx:key="" wx:for-item="major">
  26 + <view wx:if="{{index==0}}">
  27 + <text wx:if='{{itemData.majors.length>1}}' style='font-size:28rpx;color:#666'>学历(学位)继续教育 ({{itemData.majors.length}})</text>
  28 + <text wx:else style='font-size:28rpx;color:#666'>学历(学位)继续教育</text>
  29 + <view style='width:100%;display:flex;flex-direction:row '>
  30 + <view class='float_left' style='flex:1'>
  31 + <text class='text_999_24 '>扣除方式</text>
  32 + <text class='text_gray_28' style='margin-left:20rpx'>{{reducetype[major.deduction_type]}}度</text>
  33 + </view>
  34 + <view class='float_right' style='flex:1'>
  35 + <text class='text_999_24 '>可扣除金额</text>
  36 + <text class='text_orange_28 ' style='margin-left:20rpx'>¥{{major.deduction_amount}}/{{reducetype[major.deduction_type]}}</text>
  37 + </view>
  38 + </view>
  39 + </view>
  40 + </view>
  41 + <view wx:for="{{itemData.professions}}" wx:key="" wx:for-item="profession">
  42 + <view wx:if="{{index==0}}">
  43 + <text wx:if='{{itemData.professions.length>1}}' style='font-size:28rpx;color:#666'>职业资格继续教育 ({{itemData.professions.length}})</text>
  44 + <text wx:else style='font-size:28rpx;color:#666'>职业资格继续教育</text>
  45 + <text style='font-size:28rpx;color:#666' hidden='{{profession.detail_count<2}}'>({{profession.detail_count}})</text>
  46 + <view style='width:100%;display:flex;flex-direction:row '>
  47 + <view class='float_left' style='flex:1'>
  48 + <text class='text_999_24 '>扣除方式</text>
  49 + <text class='text_gray_28' style='margin-left:20rpx'>{{reducetype[profession.deduction_type]}}度</text>
  50 + </view>
  51 + <view class='float_right' style='flex:1'>
  52 + <text class='text_999_24 '>可扣除金额</text>
  53 + <text class='text_orange_28 ' style='margin-left:20rpx'>¥{{profession.deduction_amount}}/{{reducetype[profession.deduction_type]}}</text>
  54 + </view>
  55 + </view>
  56 + </view>
  57 + </view>
  58 + <!-- <view wx:for="{{itemData.detail_items}}" wx:key="" wx:for-item="itemtypedetail">
26 59 <view wx:if="{{itemtypedetail.continue_education_type=='major'}}">
27 60 <text style='font-size:28rpx;color:#666'>学历教育</text>
28 61 <view style='width:100%;display:flex;flex-direction:row '>
... ... @@ -50,7 +83,7 @@
50 83 </view>
51 84 </view>
52 85 </view>
53   - </view>
  86 + </view> -->
54 87
55 88 </view>
56 89 <view wx:else style='width:100%;padding:20rpx 20rpx;display:flex;flex-direction:row '>
... ...
... ... @@ -12,9 +12,12 @@ Page({
12 12 legal_entity_id: "",
13 13 legal_entity: "",
14 14 house_type: "",
  15 + employee_status:"",
  16 + btn_show:false,
15 17 person_total_amount: 0,
16 18 remaining_amount: 0,
17 19 input_disable: false,
  20 + origindata: {},
18 21 declareStatus: {
19 22 "to_declare": "待申报",
20 23 "declaring": "申报中",
... ... @@ -36,7 +39,7 @@ Page({
36 39 "continuing_education": "/images/continueedu_declare.png",
37 40 "support_duty": "/images/support_older_declare.png",
38 41 "medical_fund": "/images/health_declare.png",
39   - "house_fund": "/images/house_declare.png"
  42 + // "house_fund": "/images/house_declare_loan.png"
40 43 },
41 44 showModal_img: false,
42 45 showModal_reducetype: false,
... ... @@ -83,7 +86,7 @@ Page({
83 86 righttext: "确定为该子女申报",
84 87 },
85 88 support_older_modalData: {
86   - title: "请选择父母或祖父母进行申报",
  89 + title: "请选择父母进行申报",
87 90 datas: [],
88 91 lefttext: "添加被赡养人并申报",
89 92 righttext: "确定为该被赡养人申报",
... ... @@ -94,7 +97,7 @@ Page({
94 97 lefttext: "添加家庭成员并申报",
95 98 righttext: "确定为该选择的人申报",
96 99 },
97   - spousedataData:{},//配偶数据
  100 + spousedataData: {}, //配偶数据
98 101 reduce_amount: -1,
99 102 selected_reduceindex: 0,
100 103 selected_addindex: 0
... ... @@ -106,6 +109,9 @@ Page({
106 109 onLoad: function(options) {
107 110 var that = this
108 111 var housetype, housestatus
  112 + wx.showLoading({
  113 + title: '',
  114 + })
109 115 console.log("options", options);
110 116 if (options.status == 'house_fund_rent') {
111 117 housetype = 'house_fund_rent'
... ... @@ -119,6 +125,7 @@ Page({
119 125 }
120 126 this.setData({
121 127 cur_status: housestatus,
  128 + employee_status: options.employee_status ? options.employee_status:"",
122 129 house_type: housetype,
123 130 legal_entity_id: options.legal_entity_id,
124 131 legal_entity: options.legal_entity,
... ... @@ -160,6 +167,9 @@ Page({
160 167 console.log("res", res)
161 168 that.handleAddition(res.data)
162 169 }
  170 + },
  171 + fail: function(res) {
  172 + wx.hideLoading()
163 173 }
164 174 })
165 175 },
... ... @@ -167,100 +177,181 @@ Page({
167 177 handleAddition: function(data) {
168 178 var that = this
169 179 var newdata = data.items
  180 + var inputdisable = this.data.input_disable
  181 + this.setData({
  182 + origindata: data
  183 + })
170 184 if (newdata && newdata.length > 0) {
171   - var issinglechild_Data = this.data.issinglechildData;
172   - issinglechild_Data.disabled = true;
173   - issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
  185 + var btn_show = this.data.btn_show
  186 + if (that.data.cur_status == "continuing_education") {
  187 + var professionlist = newdata[0].profession_items
  188 + for (var i = 0; i < professionlist.length > 0; i++) {
  189 + if (professionlist[i].approval_date) {
  190 + professionlist[i].approval_date = this.formatDate(professionlist[i].approval_date)
  191 + }
  192 + }
  193 + var titlelist = newdata[0].title_items
  194 + for (var i = 0; i < titlelist.length > 0; i++) {
  195 + if (titlelist[i].education_start) {
  196 + titlelist[i].education_start = this.formatDate(titlelist[i].education_start).substring(0, 7)
  197 + }
  198 + if (titlelist[i].education_end) {
  199 + titlelist[i].education_end = this.formatDate(titlelist[i].education_end).substring(0, 7)
  200 + }
  201 + }
  202 + btn_show = true
  203 + // this.setData({
  204 + // issinglechildData: issinglechild_Data,
  205 + // shareMethodData: shareMethod_Data
  206 + // })
  207 + } else if (that.data.cur_status == "support_duty") {
  208 +
  209 + var supportlist = newdata[0].support_duties
  210 + if (supportlist && supportlist.length > 0) {
  211 + for (var i = 0; i < supportlist.length; i++) {
  212 + if (supportlist[i].birthday) {
  213 + supportlist[i].birthday = this.formatDate(supportlist[i].birthday)
  214 + }
  215 + }
  216 + }
  217 + var cosupportlist = newdata[0].co_supporters
  218 + if (cosupportlist && cosupportlist.length > 0) {
  219 + for (var i = 0; i < cosupportlist.length; i++) {
  220 + if (cosupportlist[i].birthday) {
  221 + cosupportlist[i].birthday = this.formatDate(cosupportlist[i].birthday)
  222 + }
  223 + if (cosupportlist[i].id_card_no) {
  224 + cosupportlist[i].id_card_no = this.formatIdNum(cosupportlist[i].id_card_no)
  225 + }
  226 + }
  227 + }
174 228
175   - var shareMethod_Data = this.data.shareMethodData;
176   - shareMethod_Data.disabled = true;
177   - shareMethod_Data.selected = data.share_method ? data.share_method : "";
  229 + var issinglechild_Data = this.data.issinglechildData;
  230 + var shareMethod_Data = this.data.shareMethodData;
  231 + if (supportlist.length < 1 && cosupportlist.length<1){
  232 + btn_show = true
  233 + inputdisable = false
  234 + issinglechild_Data.disabled = false;
  235 + shareMethod_Data.disabled = false;
  236 + issinglechild_Data.selected = '' ;
  237 + shareMethod_Data.selected = '';
  238 + }else{
  239 + btn_show = false
  240 + inputdisable = true
  241 + issinglechild_Data.disabled = true;
  242 + issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
  243 +
  244 + shareMethod_Data.disabled = true;
  245 + shareMethod_Data.selected = data.share_method ? data.share_method : "";
  246 + }
178 247
179   - this.setData({
180   - issinglechildData: issinglechild_Data,
181   - shareMethodData: shareMethod_Data,
182   - reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
183   - input_disable: true
184   - })
185   - }
186   - for (var i = 0; i < newdata.length; i++) {
187   - if (newdata[i].education_start) {
188   - newdata[i].education_start = this.formatDate(newdata[i].education_start)
189   - }
190   - if (newdata[i].education_end) {
191   - newdata[i].education_end = this.formatDate(newdata[i].education_end)
192   - }
193   - if (newdata[i].approval_date) {
194   - newdata[i].approval_date = this.formatDate(newdata[i].approval_date)
195   - }
196   - if (newdata[i].patient_birthday) {
197   - newdata[i].patient_birthday = this.formatDate(newdata[i].patient_birthday)
198   - }
199   - //详情迁移
200   - if (newdata[i].children_birthday) {
201   - newdata[i].children_birthday = this.formatDate(newdata[i].children_birthday)
202   - }
203   - if (newdata[i].spouse_birthday) {
204   - newdata[i].spouse_birthday = this.formatDate(newdata[i].spouse_birthday)
205   - }
206   - if (newdata[i].birthday) {
207   - newdata[i].birthday = this.formatDate(newdata[i].birthday)
208   - }
209   - if (newdata[i].rent_start) {
210   - newdata[i].rent_start = this.formatDate(newdata[i].rent_start)
211   - }
212   - if (newdata[i].rent_end) {
213   - newdata[i].rent_end = this.formatDate(newdata[i].rent_end)
214   - }
215   - if (newdata[i].loan_start) { //公积金
216   - newdata[i].loan_start = this.formatDate(newdata[i].loan_start)
217   - }
218   - if (newdata[i].sec_loan_start) { //商业
219   - newdata[i].sec_loan_start = this.formatDate(newdata[i].sec_loan_start)
220   - }
  248 + this.setData({
  249 + issinglechildData: issinglechild_Data,
  250 + shareMethodData: shareMethod_Data,
  251 + })
  252 + } else {
  253 + for (var i = 0; i < newdata.length; i++) {
  254 + if (newdata[i].education_start) {
  255 + newdata[i].education_start = this.formatDate(newdata[i].education_start).substring(0, 7)
  256 + }
  257 + if (newdata[i].education_end) {
  258 + newdata[i].education_end = this.formatDate(newdata[i].education_end).substring(0, 7)
  259 + }
  260 + if (newdata[i].education_period_end) {
  261 + newdata[i].education_period_end = this.formatDate(newdata[i].education_period_end).substring(0, 7)
  262 + }
  263 + if (newdata[i].patient_birthday) {
  264 + newdata[i].patient_birthday = this.formatDate(newdata[i].patient_birthday)
  265 + }
  266 + //详情迁移
  267 + if (newdata[i].children_birthday) {
  268 + newdata[i].children_birthday = this.formatDate(newdata[i].children_birthday)
  269 + }
  270 + if (newdata[i].spouse_birthday) {
  271 + newdata[i].spouse_birthday = this.formatDate(newdata[i].spouse_birthday)
  272 + }
  273 + if (newdata[i].birthday) {
  274 + newdata[i].birthday = this.formatDate(newdata[i].birthday)
  275 + }
  276 + if (newdata[i].rent_start) {
  277 + newdata[i].rent_start = this.formatDate(newdata[i].rent_start)
  278 + }
  279 + if (newdata[i].rent_end) {
  280 + newdata[i].rent_end = this.formatDate(newdata[i].rent_end)
  281 + }
  282 + if (newdata[i].loan_start) { //公积金
  283 + newdata[i].loan_start = this.formatDate(newdata[i].loan_start)
  284 + }
  285 + if (newdata[i].sec_loan_start) { //商业
  286 + newdata[i].sec_loan_start = this.formatDate(newdata[i].sec_loan_start)
  287 + }
221 288
222   - newdata[i].children_id_card_no = this.formatIdNum(newdata[i].children_id_card_no)
223   - newdata[i].spouse_id_card_no = this.formatIdNum(newdata[i].spouse_id_card_no)
224   - newdata[i].id_card_no = this.formatIdNum(newdata[i].id_card_no)
  289 + if (newdata[i].children_id_card_no) {
  290 + newdata[i].children_id_card_no = this.formatIdNum(newdata[i].children_id_card_no)
  291 + }
  292 + if (newdata[i].spouse_id_card_no) {
  293 + newdata[i].spouse_id_card_no = this.formatIdNum(newdata[i].spouse_id_card_no)
  294 + }
  295 + if (newdata[i].id_card_no) {
  296 + newdata[i].id_card_no = this.formatIdNum(newdata[i].id_card_no)
  297 + }
225 298
226   - if (newdata[i].house_address) {
227   - if (newdata[i].house_address.province == newdata[i].house_address.city) {
228   - newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
229   - } else {
230   - newdata[i].house_address_new = newdata[i].house_address.province + newdata[i].house_address.city + newdata[i].house_address.district
231   - }
232   - }
  299 + if (newdata[i].house_address) {
  300 + if (newdata[i].house_address.province == newdata[i].house_address.city) {
  301 + newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
  302 + } else {
  303 + newdata[i].house_address_new = newdata[i].house_address.province + newdata[i].house_address.city + newdata[i].house_address.district
  304 + }
  305 + }
233 306
234   - if (newdata[i].work_city) {
235   - newdata[i].work_city_new = newdata[i].work_city.province + newdata[i].work_city.city
236   - }
  307 + if (newdata[i].work_city) {
  308 + newdata[i].work_city_new = newdata[i].work_city.province + newdata[i].work_city.city
  309 + }
237 310
238   - if (newdata[i].co_supporters && newdata[i].co_supporters.length > 0) {
239   - for (var j = 0; j < newdata[i].co_supporters.length; j++) {
240   - if (newdata[i].co_supporters[j].birthday) {
241   - newdata[i].co_supporters[j].birthday = this.formatDate(newdata[i].co_supporters[j].birthday)
  311 + if (newdata[i].co_supporters && newdata[i].co_supporters.length > 0) {
  312 + for (var j = 0; j < newdata[i].co_supporters.length; j++) {
  313 + if (newdata[i].co_supporters[j].birthday) {
  314 + newdata[i].co_supporters[j].birthday = this.formatDate(newdata[i].co_supporters[j].birthday)
  315 + }
  316 + newdata[i].co_supporters[j].id_card_no = this.formatIdNum(newdata[i].co_supporters[j].id_card_no)
  317 + }
242 318 }
243   - newdata[i].co_supporters[j].id_card_no = this.formatIdNum(newdata[i].co_supporters[j].id_card_no)
244 319 }
  320 +
  321 + var housetype_new = this.data.house_type
  322 + if (newdata.length > 0 && newdata[0].type) {
  323 + housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" : "house_fund_rent"
  324 + }
  325 + console.log("housetype_new", housetype_new)
  326 + if (housetype_new !="house_fund_loan"){
  327 + btn_show = true
  328 + }
  329 + this.setData({
  330 + house_type: housetype_new,
  331 + })
245 332 }
246   - }
  333 + this.setData({
  334 + reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : -1,
  335 + input_disable: inputdisable,
247 336
248   - var housetype_new = this.data.house_type
249   - if (newdata.length > 0 && newdata[0].type) {
250   - housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" : "house_fund_rent"
  337 + btn_show: btn_show,
  338 + person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
  339 + remaining_amount: data.remaining_amount ? data.remaining_amount : 0,
  340 + additionInfo: newdata
  341 + })
  342 + console.log("newdata", newdata)
  343 + wx.hideLoading()
  344 + } else {
  345 + this.setData({
  346 + btn_show: true,
  347 + additionInfo: newdata
  348 + })
251 349 }
252   - console.log("housetype_new", housetype_new)
253   - this.setData({
254   - house_type: housetype_new,
255   - person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
256   - remaining_amount: data.remaining_amount ? data.remaining_amount : 0,
257   - additionInfo: newdata
258   - })
259 350 },
260 351
261 352 goaddSupporter: function() {
262 353 wx.navigateTo({
263   - url: '../adddupporters/adddupporters?id=' + this.data.additionInfo[0].id,
  354 + url: '../adddupporters/adddupporters?id=' + this.data.legal_entity_id,
264 355 })
265 356
266 357 },
... ... @@ -280,44 +371,123 @@ Page({
280 371
281 372 showdetail: function(e) {
282 373 if (this.data.additionInfo && this.data.additionInfo.length > 0) {
283   - console.log("showdetail", JSON.stringify(this.data.additionInfo[e.currentTarget.id]))
  374 + var info
  375 + if (this.data.cur_status == "support_duty") {
  376 + info = JSON.stringify(this.data.additionInfo[0].support_duties[e.currentTarget.id])
  377 + } else {
  378 + info = JSON.stringify(this.data.additionInfo[e.currentTarget.id])
  379 + }
  380 + console.log("showdetail", info)
  381 +
284 382 wx.navigateTo({
285   - url: '../additiondetail/additiondetail?datas=' +
286   - JSON.stringify(this.data.additionInfo[e.currentTarget.id]) + "&status=" + this.data.cur_status,
  383 + url: '../additiondetail/additiondetail?datas=' + info + "&status=" + this.data.cur_status,
287 384 })
288 385 }
289 386 },
290 387
291 388 godelete: function(e) { //删除
292 389 var that = this;
  390 + console.log("godelete", e)
  391 + wx.showModal({
  392 + title: '',
  393 + content: '确认要删除吗?',
  394 + confirmColor: '#357aeb',
  395 + success(res) {
  396 + if (res.confirm) {
  397 + console.log('用户点击确定')
  398 + that.deleteInfo(e)
  399 + } else if (res.cancel) {
  400 + console.log('用户点击取消')
  401 + }
  402 + }
  403 + })
  404 + },
  405 +
  406 + deleteInfo:function(e){
  407 + var that = this;
  408 + var new_id
  409 + var statustype = this.data.cur_status
  410 + if (this.data.cur_status == "continuing_education") {
  411 + if (e.currentTarget.id.indexOf('title') != -1) {
  412 + new_id = this.data.additionInfo[0].title_items[e.currentTarget.id.replace('title', '')].id
  413 + }
  414 + if (e.currentTarget.id.indexOf('profession') != -1) {
  415 + new_id = this.data.additionInfo[0].profession_items[e.currentTarget.id.replace('profession', '')].id
  416 + }
  417 + } else if (this.data.cur_status == "support_duty") {
  418 + if (e.currentTarget.id.indexOf('support_duty') != -1) {
  419 + new_id = this.data.additionInfo[0].support_duties[e.currentTarget.id.replace('support_duty', '')].id
  420 + }
  421 + if (e.currentTarget.id.indexOf('co_supporter') != -1) {
  422 + statustype = "co_supporter"
  423 + new_id = this.data.additionInfo[0].co_supporters[e.currentTarget.id.replace('co_supporter', '')].id
  424 + }
  425 + } else {
  426 + new_id = this.data.additionInfo[e.currentTarget.id].id
  427 + }
293 428 var Authorization = getApp().globalData.Authorization;
294 429 wx.request({
295 430 url: baseUrl + 'persontax/v1/op/delete',
296 431 data: {
297   - item_type: that.data.cur_status,
298   - id: that.data.legal_entity_id
  432 + item_type: statustype,
  433 + id: new_id
299 434 },
300 435 header: {
301 436 'content-type': 'application/json',
302 437 "Authorization": Authorization
303 438 },
304 439 method: "POST",
305   - success: function(res) {
306   - if (res && res.data) {
307   - console.log("res", res)
308   -
  440 + success: function (res) {
  441 + console.log("success", res)
  442 + if (res.statusCode == 200) {
  443 + that.getAdditionInfo()
  444 + } else {
  445 + wx.showToast({
  446 + title: res.data.message,
  447 + icon: "none"
  448 + })
309 449 }
  450 +
  451 + },
  452 + fail: function (res) {
  453 + console.log("fail", res)
  454 + wx.showToast({
  455 + title: res.data.message,
  456 + icon: "none"
  457 + })
310 458 }
311 459 })
312 460 },
313 461
314 462 goedit: function(e) { //编辑
315 463 console.log("goedit", e)
316   - if (this.data.additionInfo && this.data.additionInfo.length > 0) {
317   - wx.navigateTo({
318   - url: '../addextrainfo/addextrainfo?datas=' + JSON.stringify(this.data.additionInfo[e.currentTarget.id]) + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex] + '&isedit=true',
319   - })
  464 + var oridata = this.data.origindata ? this.data.origindata.items : []
  465 + var new_info
  466 + if (this.data.cur_status == "continuing_education") {
  467 + if (e.currentTarget.id.indexOf('title') != -1) {
  468 + new_info = oridata[0].title_items[e.currentTarget.id.replace('title', '')]
  469 + }
  470 + if (e.currentTarget.id.indexOf('profession') != -1) {
  471 + new_info = oridata[0].profession_items[e.currentTarget.id.replace('profession', '')]
  472 + }
  473 + } else if (this.data.cur_status == "support_duty") {
  474 + if (e.currentTarget.id.indexOf('support_duty') != -1) {
  475 + new_info = oridata[0].support_duties[e.currentTarget.id.replace('support_duty', '')]
  476 + }
  477 + if (e.currentTarget.id.indexOf('co_supporter') != -1) {
  478 + new_info = oridata[0].co_supporters[e.currentTarget.id.replace('co_supporter', '')]
  479 + wx.navigateTo({
  480 + url: '../adddupporters/adddupporters?datas=' + JSON.stringify(new_info) + '&status=' + this.data.cur_status + "&id=" + this.data.legal_entity_id,
  481 + })
  482 + return;
  483 + }
  484 + } else {
  485 + new_info = oridata[e.currentTarget.id]
320 486 }
  487 + console.log("new_info", new_info)
  488 + wx.navigateTo({
  489 + url: '../addextrainfo/addextrainfo?datas=' + JSON.stringify(new_info) + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex] + '&isedit=true',
  490 + })
321 491 },
322 492
323 493 goadd: function(e) { //添加
... ... @@ -338,7 +508,7 @@ Page({
338 508 this.showToast("请输入扣除金额")
339 509 return
340 510 }
341   - if (!format.checkNumber(this.data.reduce_amount+"")){
  511 + if (!format.checkNumber(this.data.reduce_amount + "")) {
342 512 this.showToast("请输入正确格式")
343 513 return
344 514 }
... ... @@ -389,6 +559,12 @@ Page({
389 559 if (!Authorization || Authorization.length < 10) {
390 560 return
391 561 }
  562 + var type = "all"
  563 + if (this.data.cur_status == "children_education") {
  564 + type = "children"
  565 + } else if (this.data.cur_status == "support_duty") {
  566 + type = "parents"
  567 + }
392 568 wx.request({
393 569 url: baseUrl + 'persontax/v1/personal-taxes',
394 570 method: "GET",
... ... @@ -397,16 +573,27 @@ Page({
397 573 "Authorization": Authorization
398 574 },
399 575 data: {
400   - 'all': true
  576 + // 'all': true,
  577 + "declare_unit_id":that.data.legal_entity_id,
  578 + "category": type
401 579 },
402 580 success: function(res) {
403 581 console.log('succ', res)
404 582 if (res.statusCode == 200) {
405 583 that.handleData(res.data);
  584 + } else {
  585 + wx.showToast({
  586 + title: res.data.message,
  587 + icon: "none"
  588 + })
406 589 }
407 590 },
408   - fail(res) {
409   - console.log(res.data)
  591 + fail: function(res) {
  592 + console.log("fail", res)
  593 + wx.showToast({
  594 + title: res.data.message,
  595 + icon: "none"
  596 + })
410 597 },
411 598 complete() {
412 599 wx.hideLoading()
... ... @@ -431,12 +618,12 @@ Page({
431 618 if (data.items[i].family_ties == '子' || data.items[i].family_ties == '女') {
432 619 childRelativelist.push(data.items[i])
433 620 }
434   - if (data.items[i].family_ties == '父母' || data.items[i].family_ties == '祖父母、外祖父母') {
  621 + if (data.items[i].family_ties == '父母' || data.items[i].family_ties == '其他') {
435 622 olderRelativelist.push(data.items[i])
436 623 } else {
437 624 medicalRelativelist.push(data.items[i])
438 625 }
439   - if (data.items[i].family_ties == '配偶'){
  626 + if (data.items[i].family_ties == '配偶') {
440 627 spousedatalist = data.items[i]
441 628 }
442 629 }
... ... @@ -462,7 +649,9 @@ Page({
462 649 closeModalImg: function(e) {
463 650 console.log("closeModalImg", e)
464 651 this.setData({
465   - showModal_img: false
  652 + showModal_img: false,
  653 + showModal_reducetype: false,
  654 + showModal_addtype: false
466 655 })
467 656 },
468 657
... ...
1 1 <!--pages/main/addtionalreduce/childreneducate/childreneducate.wxml-->
2 2 <import src="../../../common/picker_cell" />
3 3
4   - <view style='width:100%;height:100%;'>
5   - <view style='display:flex;flex-direction:column;margin-bottom:140rpx;'>
6   - <image class='openmodal_img' src="/images/openmodal_img.png" bindtap='showModalImg'></image>
  4 +<view style='width:100%;height:100%;'>
  5 + <view style='display:flex;flex-direction:column;margin-bottom:140rpx;'>
  6 + <image class='openmodal_img' src="/images/openmodal_img.png" bindtap='showModalImg'></image>
7 7
8   - <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='children_education'||cur_status=='house_fund'}}">
9   - <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text>
10   - <text class='text_999_30 float_right' style='line-height:100rpx'>月度</text>
11   - </view>
12   - <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='medical_fund'}}">
13   - <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text>
14   - <text class='text_999_30 float_right' style='line-height:100rpx'>年度</text>
15   - </view>
16   - <!-- 12.22 更新为不可选择(去掉点击事件) -->
17   - <!-- <view style='height:100rpx;padding:0 30rpx;background:#FFF' bindtap='showModalReducetype' wx:elif="{{cur_status!='continuing_education'&&cur_status!='support_duty'}}">
  8 + <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='children_education'||cur_status=='house_fund'}}">
  9 + <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text>
  10 + <text class='text_999_30 float_right' style='line-height:100rpx'>月度</text>
  11 + </view>
  12 + <view style='height:100rpx;padding:0 30rpx;background:#FFF' wx:if="{{cur_status=='medical_fund'}}">
  13 + <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text>
  14 + <text class='text_999_30 float_right' style='line-height:100rpx'>年度</text>
  15 + </view>
  16 + <!-- 12.22 更新为不可选择(去掉点击事件) -->
  17 + <!-- <view style='height:100rpx;padding:0 30rpx;background:#FFF' bindtap='showModalReducetype' wx:elif="{{cur_status!='continuing_education'&&cur_status!='support_duty'}}">
18 18 <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>扣除方式</text>
19 19 <image class='arrow_img float_right' style='margin-top:28rpx' src="/images/arrow_right.png"></image>
20 20 <text class='text_999_30 float_right' style='line-height:100rpx'>{{reducetypeData[selected_reduceindex]}}</text>
21 21 </view> -->
22   - <view wx:if="{{cur_status=='support_duty'}}" style='padding-right:30rpx;background:#FFF'>
23   - <template is="picker_cell_normal" data="{{...issinglechildData}}" />
24   -
25   - <view wx:if="{{issinglechildData.selected=='否'}}">
26   - <view class='divide_line_f5f5f5'></view>
27   - <template is="picker_cell_normal" data="{{...shareMethodData}}" />
28   - <view class='divide_line_f5f5f5'></view>
29   - <view wx:if="{{!input_disable}}" style='height:90rpx'>
30   - <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
31   - <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:20rpx' name='country'>/月</text>
32   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入(不超过1000)' name='reduce_amount' bindblur='bindinput' value='{{reduce_amount>=0?reduce_amount:""}}'></input>
33   - </view>
34   - <view wx:else style='height:90rpx'>
35   - <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
36   - <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #ff9f00;' name='country'>¥{{reduce_amount}}/月</text>
37   - </view>
  22 + <view wx:if="{{cur_status=='support_duty'}}" style='padding-right:30rpx;background:#FFF'>
  23 + <template is="picker_cell_normal" data="{{...issinglechildData}}" />
  24 + <view wx:if="{{issinglechildData.selected=='否'}}">
  25 + <view style='background:#f5f5f5;height:2rpx;margin-left:30rpx;'></view>
  26 + <template is="picker_cell_normal" data="{{...shareMethodData}}" />
  27 + <view style='background:#f5f5f5;height:2rpx;margin-left:30rpx;'></view>
  28 + <view wx:if="{{!input_disable}}" style='height:90rpx'>
  29 + <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
  30 + <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:20rpx' name='country'>/月</text>
  31 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入(不超过1000)' name='reduce_amount' bindblur='bindinput' value='{{reduce_amount>=0?reduce_amount:""}}'></input>
38 32 </view>
39   - <view wx:elif="{{issinglechildData.selected=='是'}}">
40   - <view class='divide_line_f5f5f5'></view>
41   - <view style='height:90rpx'>
42   - <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
43   - <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #ff9f00;' name='country'>¥2000/月</text>
44   - </view>
  33 + <view wx:else style='height:90rpx'>
  34 + <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
  35 + <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #ff9f00;' name='country'>¥{{reduce_amount}}/月</text>
45 36 </view>
46 37 </view>
  38 + <view wx:elif="{{issinglechildData.selected=='是'}}">
  39 + <view style='background:#f5f5f5;height:2rpx;margin-left:30rpx;'></view>
  40 + <view style='height:90rpx'>
  41 + <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:26rpx'>本年度月扣除金额</text>
  42 + <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #ff9f00;' name='country'>¥2000/月</text>
  43 + </view>
  44 + </view>
  45 + </view>
47 46
48 47
49   - <view wx:if="{{additionInfo&&additionInfo.length>0}}">
  48 + <view wx:if="{{additionInfo&&additionInfo.length>0}}">
50 49
51   - <view wx:if="{{cur_status=='children_education'}}">
52   - <view wx:for="{{additionInfo}}">
53   - <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
54   - <view style='height:110rpx'>
55   - <text class='text_gray_36 float_left' style='line-height:110rpx'>{{item.children_name}}</text>
56   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
57   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
58   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
  50 + <view wx:if="{{cur_status=='children_education'}}">
  51 + <view wx:for="{{additionInfo}}">
  52 + <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
  53 + <view style='height:110rpx'>
  54 + <text class='text_gray_36 float_left' style='line-height:110rpx'>{{item.children_name}}</text>
  55 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  56 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  57 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
59 58
  59 + </view>
  60 + <view style='padding-right: 30rpx'>
  61 + <view class='divide_line_f5f5f5' style="margin-bottom:6rpx"></view>
  62 + <view style='height:70rpx'>
  63 + <text class='text_999_28 ' style='line-height:70rpx'>子女姓名:</text>
  64 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.children_name}}</text>
60 65 </view>
61   - <view style='padding-right: 30rpx'>
62   - <view class='divide_line_f5f5f5'></view>
63   - <view style='height:70rpx'>
64   - <text class='text_999_28 ' style='line-height:70rpx'>子女姓名:</text>
65   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.children_name}}</text>
66   - </view>
67   - <view style='height:70rpx'>
68   - <text class='text_999_28 ' style='line-height:70rpx'>分配比例:</text>
69   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.percent}}%</text>
70   - </view>
71   - <view style='height:70rpx'>
72   - <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
73   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
74   - </view>
75   - <view style='height:70rpx'>
76   - <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
77   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
78   - </view>
79   - <view class='divide_line_f5f5f5'></view>
80   - <text class='text_blue_28 float_right' style='line-height:90rpx;margin-left:40rpx' id='{{index}}' bindtap='showdetail'>查看</text>
81   - <view class='float_right' wx:if="{{item.status=='failed'}}">
82   - <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
83   - <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
84   - </view>
  66 + <view style='height:70rpx'>
  67 + <text class='text_999_28 ' style='line-height:70rpx'>分配比例:</text>
  68 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.percent}}%</text>
  69 + </view>
  70 + <view style='height:70rpx'>
  71 + <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
  72 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
  73 + </view>
  74 + <view style='height:70rpx'>
  75 + <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
  76 + <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
  77 + </view>
  78 + <view class='divide_line_f5f5f5' style="margin-top:6rpx"></view>
  79 + <text class='text_blue_28 float_right' style='line-height:90rpx;margin-left:40rpx' id='{{index}}' bindtap='showdetail'>查看</text>
  80 + <view class='float_right' wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  81 + <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id="{{index}}" bindtap='godelete'>删除</text>
  82 + <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
85 83 </view>
86 84 </view>
87 85 </view>
88 86 </view>
  87 + </view>
89 88
90   - <view wx:if="{{cur_status=='continuing_education'}}">
91   - <view wx:for="{{additionInfo}}">
92   - <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column' wx:if="{{item.education_type==''||item.education_type=='title'}}">
93   - <view style='height:110rpx'>
94   - <text class='text_gray_36' style='line-height:110rpx'>学历教育</text>
95   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
96   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
97   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
98   - </view>
  89 + <view wx:if="{{cur_status=='continuing_education'}}">
  90 + <!-- 学历 -->
  91 + <view wx:if="{{additionInfo[0].title_items&&additionInfo[0].title_items.length>0}}">
  92 + <view style='margin:30rpx;padding-left: 30rpx;padding-bottom: 20rpx' class='card_rectangle_bg_column'>
  93 + <view style='height:110rpx'>
  94 + <text class='text_gray_36' style='line-height:110rpx'>学历(学位)继续教育</text>
  95 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[additionInfo[0].title_items[0].status]}}</view>
  96 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[additionInfo[0].title_items[0].status]}}</view>
  97 + <view wx:else class='declare_style orange_bg'> {{declareStatus[additionInfo[0].title_items[0].status]}}</view>
  98 + </view>
  99 + <view wx:for="{{additionInfo[0].title_items}}">
99 100 <view style='padding-right:right'>
100   - <view class='divide_line_f5f5f5'></view>
101   - <!-- <view style='height:70rpx'>
102   - <text class='text_999_28 ' style='line-height:70rpx'>继续教育情况:</text>
103   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type}}</text>
104   - </view> -->
105   - <view style='height:70rpx'>
106   - <text class='text_999_28 ' style='line-height:70rpx'>教育阶段:</text>
107   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_period}}</text>
  101 + <view style="background:#f5f5f5;height:2rpx;width:94%"></view>
  102 + <view>
  103 + <text style='font-family: PingFangSC-Semibold;font-size: 14px;color: #333;line-height:80rpx;'>{{item.education_period}}</text>
  104 +
108 105 </view>
109 106 <view style='height:70rpx'>
110   - <text class='text_999_28 ' style='line-height:70rpx'>入学时间起:</text>
  107 + <text class='text_999_28 ' style='line-height:70rpx'>受教育日期起:</text>
111 108 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_start}}</text>
112 109 </view>
113 110 <view style='height:70rpx'>
114   - <text class='text_999_28 ' style='line-height:70rpx'>(预计)毕业时间</text>
  111 + <text class='text_999_28 ' style='line-height:70rpx'>受教育日期止:</text>
115 112 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_end}}</text>
116 113 </view>
117   - <view style='height:70rpx'>
118   - <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
119   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
120   - </view>
121   - <view style='height:70rpx'>
122   - <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
123   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
  114 + <view wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  115 + <text class='text_blue_28 float_right' style='line-height:90rpx;margin-right:40rpx' id="{{'title'+index}}" bindtap='goedit'>编辑</text>
  116 + <text class='text_999_28 float_right' style='line-height:90rpx;margin-right:40rpx' id="{{'title'+index}}" bindtap='godelete'>删除</text>
124 117 </view>
125 118 </view>
126   -
127 119 </view>
128   - <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column' wx:if="{{item.education_type=='profession'||item.education_type=='major'}}">
129   - <view style='height:110rpx'>
130   - <text class='text_gray_36' style='line-height:110rpx'>非学历教育</text>
131   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
132   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
133   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
134   - </view>
135   - <view style='padding-right:30rpx'>
136   - <view class='divide_line_f5f5f5'></view>
137   - <!-- <view style='height:70rpx'>
138   - <text class='text_999_28 ' style='line-height:70rpx'>继续教育情况:</text>
139   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type=='title'?"学历教育":"非学历教育"}}</text>
140   - </view> -->
141   - <view style='height:70rpx'>
142   - <text class='text_999_28 ' style='line-height:70rpx'>继续教育类型:</text>
143   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.education_type=='major'?"专业技术人员职业资格":"技能人员职业资格"}}</text>
  120 + <view style="background:#f5f5f5;height:2rpx;width:94%;"></view>
  121 + <view style='height:70rpx'>
  122 + <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
  123 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[additionInfo[0].title_items[0].deduction_type]}}度</text>
  124 + </view>
  125 + <view style='height:70rpx'>
  126 + <text class='text_999_28' style='line-height:70rpx'>扣除金额:</text>
  127 + <text class='text_orange_28' style='line-height:70rpx;margin-left:20rpx'>¥{{additionInfo[0].title_items[0].deduction_amount}}/{{reducetype[additionInfo[0].title_items[0].deduction_type]}}</text>
  128 + </view>
  129 + </view>
  130 + </view>
  131 + <!-- 非学历 -->
  132 + <view wx:if="{{additionInfo[0].profession_items&&additionInfo[0].profession_items.length>0}}">
  133 + <view style='margin:30rpx;padding-left: 30rpx;padding-bottom: 20rpx' class='card_rectangle_bg_column'>
  134 + <view style='height:110rpx'>
  135 + <text class='text_gray_36' style='line-height:110rpx'>职业资格继续教育</text>
  136 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[additionInfo[0].profession_items[0].status]}}</view>
  137 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[additionInfo[0].profession_items[0].status]}}</view>
  138 + <view wx:else class='declare_style orange_bg'> {{declareStatus[additionInfo[0].profession_items[0].status]}}</view>
  139 + </view>
  140 + <view wx:for="{{additionInfo[0].profession_items}}">
  141 + <view style='padding-right:right'>
  142 + <view style="background:#f5f5f5;height:2rpx;width:94%;"></view>
  143 + <view>
  144 + <text style='font-family: PingFangSC-Semibold;font-size: 14px;color: #333;line-height:80rpx;' wx:if="{{item.education_type=='profession'}}">技能人员职业资格</text>
  145 + <text style='font-family: PingFangSC-Semibold;font-size: 14px;color: #333;line-height:80rpx;' wx:if="{{item.education_type=='major'}}">专业人员职业资格</text>
  146 +
144 147 </view>
145   - <view style='height:70rpx'>
146   - <text class='text_999_28 ' style='line-height:70rpx'>发证(批准)日期</text>
  148 + <view>
  149 + <text class='text_999_28 ' style='line-height:70rpx'>发证(批准)日期:</text>
147 150 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.approval_date}}</text>
148 151 </view>
149   - <view style='height:70rpx'>
  152 + <view style='display:flex;flex-direction:row'>
150 153 <text class='text_999_28 ' style='line-height:70rpx'>证书名称:</text>
151   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.certification_name}}</text>
  154 + <view class='float_right' style='padding-top:14rpx; font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;max-width:500rpx'>{{item.certification_name}}</view>
152 155 </view>
153   - <view style='height:70rpx'>
  156 + <view style='display:flex;flex-direction:row'>
154 157 <text class='text_999_28 ' style='line-height:70rpx'>证书编号:</text>
155   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.certification_no}}</text>
  158 + <view class='float_right' style='font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:70rpx;max-width:500rpx'>{{item.certification_no}}</view>
156 159 </view>
157   - <view style='height:70rpx'>
  160 + <view style='display:flex;flex-direction:row'>
158 161 <text class='text_999_28 ' style='line-height:70rpx'>发证机关:</text>
159   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.certification_authority}}</text>
160   - </view>
161   - <view style='height:70rpx'>
162   - <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
163   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
  162 + <view class='float_right' style='padding-top:14rpx; font-family: PingFangSC-Regular;font-size: 28rpx;color: #333;line-height:40rpx;max-width:500rpx'>{{item.certification_authority}}</view>
164 163 </view>
165   - <view style='height:70rpx'>
166   - <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
167   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
  164 + <view wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  165 + <text class='text_blue_28 float_right' style='line-height:90rpx;margin-right:40rpx' id="{{'profession'+index}}" bindtap='goedit'>编辑</text>
  166 + <text class='text_999_28 float_right' style='line-height:90rpx;margin-right:40rpx' id="{{'profession'+index}}" bindtap='godelete'>删除</text>
168 167 </view>
169 168 </view>
170 169 </view>
171   -
172   - <view class='float_right' wx:if="{{item.status=='failed'}}">
173   - <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
174   - <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
  170 + <view style="background:#f5f5f5;height:2rpx;width:94%;"></view>
  171 + <view style='height:70rpx'>
  172 + <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
  173 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[additionInfo[0].profession_items[0].deduction_type]}}度</text>
175 174 </view>
  175 + <view style='height:70rpx'>
  176 + <text class='text_999_28' style='line-height:70rpx'>扣除金额:</text>
  177 + <text class='text_orange_28' style='line-height:70rpx;margin-left:20rpx'>¥{{additionInfo[0].profession_items[0].deduction_amount}}/{{reducetype[additionInfo[0].profession_items[0].deduction_type]}}</text>
  178 + </view>
  179 +
176 180 </view>
177 181 </view>
  182 + </view>
  183 +
  184 + <view wx:if="{{cur_status=='support_duty'}}">
  185 + <view wx:if="{{additionInfo[0].support_duties&&additionInfo[0].support_duties.length>0}}">
  186 + <view style='margin:30rpx;padding-left:30rpx' class='card_rectangle_bg_column'>
  187 + <view style='height:110rpx'>
  188 + <text class='text_gray_36 float_left' style='line-height:110rpx'>被赡养人</text>
  189 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[additionInfo[0].support_duties[0].status]}}</view>
  190 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[additionInfo[0].support_duties[0].status]}}</view>
  191 + <view wx:else class='declare_style orange_bg'> {{declareStatus[additionInfo[0].support_duties[0].status]}}</view>
  192 + </view>
  193 + <view wx:for="{{additionInfo[0].support_duties}}">
178 194
179   - <view wx:if="{{cur_status=='support_duty'}}">
180   - <view wx:if="{{additionInfo.length>0}}" wx:for="{{additionInfo}}">
181   - <view style='margin:30rpx;padding-left:30rpx' class='card_rectangle_bg_column'>
182   - <view style='height:110rpx'>
183   - <text class='text_gray_36 float_left' style='line-height:110rpx'>被赡养人</text>
184   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
185   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
186   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
187   - </view>
188 195 <view style='padding-right:30rpx'>
189 196 <view class='divide_line_f5f5f5'></view>
190 197 <view style='height:70rpx'>
... ... @@ -195,32 +202,27 @@
195 202 <text class='text_999_28 ' style='line-height:70rpx'>与纳税人关系:</text>
196 203 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.relationship}}</text>
197 204 </view>
198   - <!-- <view style='height:70rpx'>
199   - <text class='text_999_28 ' style='line-height:70rpx'>分摊比例:</text>
200   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.percent}}%</text>
201   - </view>
202   - <view style='height:70rpx'>
203   - <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
204   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
205   - </view>
206   - <view style='height:70rpx'>
207   - <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
208   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
209   - </view> -->
210 205 <view class='divide_line_f5f5f5'></view>
211 206 <text class='text_blue_28 float_right' style='line-height:90rpx;margin-left:40rpx' id='{{index}}' bindtap='showdetail'>查看</text>
212   - <view class='float_right' wx:if="{{item.status=='failed'}}">
213   - <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
214   - <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
  207 + <view class='float_right' wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  208 + <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id="{{'support_duty'+index}}" bindtap='godelete'>删除</text>
  209 + <text class='text_blue_28 ' style='line-height:90rpx;' id="{{'support_duty'+index}}" bindtap='goedit'>编辑</text>
215 210 </view>
216 211 </view>
217   -
218 212 </view>
219   - <view wx:if="{{item.co_supporters&&item.co_supporters.length>0}}">
220   - <view wx:for="{{item.co_supporters}}" style='margin:30rpx;padding-left:30rpx' class='card_rectangle_bg_column' wx:for-item="itemdetail">
221   - <view style='height:110rpx'>
222   - <text class='text_gray_36 float_left' style='line-height:110rpx'>共同赡养人</text>
223   - </view>
  213 + </view>
  214 + <view style='background:#FFF;padding:30rpx' wx:if="{{employee_status!='inactive'}}">
  215 + <view style='line-height:84rpx;text-align:center;font-size:34rpx;color:#fff;background:#357AEB;border-radius:5px;' id="{{index}}" bindtap='goadd'>
  216 + 添加
  217 + </view>
  218 + </view>
  219 + <view wx:if="{{additionInfo[0].co_supporters&&additionInfo[0].co_supporters.length>0}}">
  220 + <view style='margin:30rpx;padding-left:30rpx' class='card_rectangle_bg_column'>
  221 + <view style='height:110rpx'>
  222 + <text class='text_gray_36 float_left' style='line-height:110rpx'>共同赡养人</text>
  223 + </view>
  224 + <view wx:for="{{additionInfo[0].co_supporters}}" wx:for-item="itemdetail">
  225 +
224 226 <view style='padding-right:30rpx'>
225 227 <view class='divide_line_f5f5f5'></view>
226 228 <view style='height:70rpx'>
... ... @@ -247,208 +249,230 @@
247 249 <text class='text_999_28 ' style='line-height:70rpx'>与纳税人关系:</text>
248 250 <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{itemdetail.relationship}}</text>
249 251 </view>
  252 + <view class='float_right' wx:if="{{employee_status!='inactive'}}">
  253 + <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id="{{'co_supporter'+index}}" bindtap='godelete'>删除</text>
  254 + <text class='text_blue_28 ' style='line-height:90rpx;' id="{{'co_supporter'+index}}" bindtap='goedit'>编辑</text>
  255 + </view>
250 256 </view>
251 257 </view>
252 258 </view>
253   - <view>
254   - <!-- <view style='background:#FFF;padding:30rpx' wx:if="{{idx==additionInfo.length-1}}">
255   - <view style='line-height:84rpx;text-align:center;font-size:34rpx;color:#fff;background:#357AEB;' id='{{index}}' bindtap='goadd'>
256   - 添加
257   - </view>
258   - </view> -->
259   - <view style='margin-left:30rpx' wx:if="{{issinglechildData.selected=='否'&&(!item.co_supporters||item.co_supporters.length<1)}}">
260   - <text class='text_999_28'>您还没有添加继续共同赡养人,</text>
261   - <text class='text_blue_28' bindtap='goaddSupporter'>请添加</text>
262   - </view>
  259 +
  260 + </view>
  261 + <view>
  262 + <view style='margin-left:30rpx' wx:if="{{employee_status!='inactive'&&issinglechildData.selected!='是'}}">
  263 + <!-- <text class='text_999_28'>您还没有添加继续共同赡养人,</text> -->
  264 + <text class='text_blue_28' bindtap='goaddSupporter'>添加共同赡养人</text>
263 265 </view>
264 266 </view>
265 267 </view>
  268 + </view>
266 269
267   - <view wx:if="{{cur_status=='medical_fund'}}">
268   - <view class='divide_line_f5f5f5'></view>
269   - <view style='height:100rpx;margin:0 30rpx;background:#FFF' bindtap='reducetype'>
270   - <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>个人负担总金额</text>
271   - <text class='text_orange_28 float_right' style='line-height:100rpx'>¥{{person_total_amount}}</text>
272   - </view>
273   - <view class='divide_line_f5f5f5'></view>
274   - <view style='height:100rpx;margin:0 30rpx;background:#FFF' bindtap='reducetype'>
275   - <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>可扣除金额</text>
276   - <text class='text_orange_28 float_right' style='line-height:100rpx'>¥{{remaining_amount}}</text>
277   - </view>
278   - <view class='divide_line_f5f5f5'></view>
279   - <view wx:for="{{additionInfo}}">
280   - <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
281   - <view style='height:110rpx'>
282   - <text class='text_gray_36' style='line-height:110rpx'>支出明细</text>
283   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
284   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
285   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
  270 + <view wx:if="{{cur_status=='medical_fund'}}">
  271 + <view class='divide_line_f5f5f5'></view>
  272 + <view style='height:100rpx;margin:0 30rpx;background:#FFF' bindtap='reducetype'>
  273 + <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>个人负担总金额</text>
  274 + <text class='text_orange_28 float_right' style='line-height:100rpx'>¥{{person_total_amount}}</text>
  275 + </view>
  276 + <view class='divide_line_f5f5f5'></view>
  277 + <view style='height:100rpx;margin:0 30rpx;background:#FFF' bindtap='reducetype'>
  278 + <text style='font-size:30rpx;color:#333;line-height:100rpx;font-family: PingFangSC-Semibold;float:left'>可扣除金额</text>
  279 + <text class='text_orange_28 float_right' style='line-height:100rpx'>¥{{remaining_amount}}</text>
  280 + </view>
  281 + <view class='divide_line_f5f5f5' ></view>
  282 + <view wx:for="{{additionInfo}}">
  283 + <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
  284 + <view style='height:110rpx'>
  285 + <text class='text_gray_36' style='line-height:110rpx'>支出明细</text>
  286 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  287 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  288 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
  289 + </view>
  290 + <view style='padding-right:30rpx'>
  291 + <view class='divide_line_f5f5f5'></view>
  292 + <view style='height:70rpx'>
  293 + <text class='text_999_28 ' style='line-height:70rpx'>病人姓名:</text>
  294 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.name}}</text>
286 295 </view>
287   - <view style='padding-right:30rpx'>
288   - <view class='divide_line_f5f5f5'></view>
289   - <view style='height:70rpx'>
290   - <text class='text_999_28 ' style='line-height:70rpx'>病人姓名:</text>
291   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.name}}</text>
292   - </view>
293   - <view style='height:70rpx'>
294   - <text class='text_999_28 ' style='line-height:70rpx'>病人证照类型:</text>
295   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>居民身份证</text>
296   - </view>
297   - <view style='height:70rpx'>
298   - <text class='text_999_28 ' style='line-height:70rpx'>病人证照号码:</text>
299   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.id_card_no}}</text>
300   - </view>
301   - <view style='height:70rpx'>
302   - <text class='text_999_28 ' style='line-height:70rpx'>病人出生日期:</text>
303   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.patient_birthday}}</text>
304   - </view>
305   - <view style='height:70rpx'>
306   - <text class='text_999_28 ' style='line-height:70rpx'>病人国籍:</text>
307   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>中国</text>
308   - </view>
309   - <view style='height:70rpx'>
310   - <text class='text_999_28 ' style='line-height:70rpx'>与纳税人关系:</text>
311   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.relationship}}</text>
312   - </view>
313   - <view style='height:70rpx'>
314   - <text class='text_999_28 ' style='line-height:70rpx'>医疗支出总金额:</text>
315   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.total_amount}}元</text>
316   - </view>
317   - <view style='height:70rpx'>
318   - <text class='text_999_28 ' style='line-height:70rpx'>个人负担金额:</text>
319   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.amount_by_person}}元</text>
320   - </view>
321   - <view class='float_right' wx:if="{{item.status=='failed'}}">
322   - <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
323   - <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
324   - </view>
  296 + <view style='height:70rpx'>
  297 + <text class='text_999_28 ' style='line-height:70rpx'>病人证照类型:</text>
  298 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>居民身份证</text>
  299 + </view>
  300 + <view style='height:70rpx'>
  301 + <text class='text_999_28 ' style='line-height:70rpx'>病人证照号码:</text>
  302 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.id_card_no}}</text>
  303 + </view>
  304 + <view style='height:70rpx'>
  305 + <text class='text_999_28 ' style='line-height:70rpx'>病人出生日期:</text>
  306 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.patient_birthday}}</text>
  307 + </view>
  308 + <view style='height:70rpx'>
  309 + <text class='text_999_28 ' style='line-height:70rpx'>病人国籍:</text>
  310 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>中国</text>
  311 + </view>
  312 + <view style='height:70rpx'>
  313 + <text class='text_999_28 ' style='line-height:70rpx'>与纳税人关系:</text>
  314 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.relationship}}</text>
  315 + </view>
  316 + <view style='height:70rpx'>
  317 + <text class='text_999_28 ' style='line-height:70rpx'>医疗支出总金额:</text>
  318 + <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.total_amount}}元</text>
  319 + </view>
  320 + <view style='height:70rpx'>
  321 + <text class='text_999_28 ' style='line-height:70rpx'>个人负担金额:</text>
  322 + <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.amount_by_person}}元</text>
  323 + </view>
  324 + <view class='float_right' wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  325 + <text class='text_999_28 ' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
  326 + <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
325 327 </view>
326 328 </view>
327 329 </view>
328 330 </view>
  331 + </view>
329 332
330   - <view wx:if="{{cur_status=='house_fund'}}">
331   - <view wx:for="{{additionInfo}}">
332   - <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
333   - <view style='height:110rpx'>
334   - <text class='text_gray_36 float_left' style='line-height:110rpx'>住房</text>
335   - <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
336   - <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
337   - <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
338   - </view>
339   - <view style='padding-right: 30rpx'>
340   - <view class='divide_line_f5f5f5'></view>
341   - <view style='display:flex;flex-direction:row'>
342   - <view wx:if="{{house_type=='house_fund_rent'}}">
343   - <view class='text_999_28 float_left' style='line-height:70rpx;width:248rpx;text-align:left;white-space:nowrap;'>租赁房屋坐落地址:</view>
344   - <view style='display:flex;flex-direction:column;max-width:392rpx;'>
345   - <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
346   - <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
347   - </view>
348   - </view>
349   - <view wx:if="{{house_type=='house_fund_loan'}}">
350   - <text class='text_999_28 float_left' style='line-height:70rpx;width:192rpx;text-align:left;white-space:nowrap;'>房屋坐落地址:</text>
351   - <view style='display:flex;flex-direction:column;max-width:450rpx;'>
352   - <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
353   - <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
354   - </view>
  333 + <view wx:if="{{cur_status=='house_fund'}}">
  334 + <view wx:for="{{additionInfo}}">
  335 + <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
  336 + <view style='height:110rpx'>
  337 + <text class='text_gray_36 float_left' style='line-height:110rpx'>住房</text>
  338 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  339 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  340 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
  341 + </view>
  342 + <view style='padding-right: 30rpx' >
  343 + <view class='divide_line_f5f5f5' style="margin-bottom:6rpx"></view>
  344 + <view style='display:flex;flex-direction:row'>
  345 + <view wx:if="{{house_type=='house_fund_rent'}}">
  346 + <view class='text_999_28 float_left' style='line-height:70rpx;width:248rpx;text-align:left;white-space:nowrap;'>租赁房屋坐落地址:</view>
  347 + <view style='display:flex;flex-direction:column;max-width:392rpx;'>
  348 + <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
  349 + <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
355 350 </view>
356 351 </view>
357   - <!-- <view wx:if="{{house_type=='house_fund_loan'}}">
358   - <text class='text_999_28 ' style='line-height:70rpx'>房屋坐落地址:</text>
359   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.house_address_new}}</text>
360   - <text class='text_999_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.house_detail_address}}</text>
361   - </view> -->
362   - <view style='height:70rpx'>
363   - <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
364   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
365   - </view>
366   - <view style='height:70rpx'>
367   - <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
368   - <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
369   - </view>
370   - <view class='divide_line_f5f5f5'></view>
371   - <text class='text_blue_28 float_right' style='line-height:90rpx;margin-left:40rpx' id='{{index}}' bindtap='showdetail'>查看</text>
372   - <view class='float_right' wx:if="{{item.status=='failed'}}">
373   - <text class='text_999_28' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
374   - <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
  352 + <view wx:if="{{house_type=='house_fund_loan'}}">
  353 + <text class='text_999_28 float_left' style='line-height:70rpx;width:192rpx;text-align:left;white-space:nowrap;'>房屋坐落地址:</text>
  354 + <view style='display:flex;flex-direction:column;max-width:450rpx;'>
  355 + <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
  356 + <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
  357 + </view>
375 358 </view>
376 359 </view>
  360 + <view style='height:70rpx'>
  361 + <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
  362 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}度</text>
  363 + </view>
  364 + <view style='height:70rpx'>
  365 + <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
  366 + <text class='text_orange_28 ' style='line-height:70rpx;margin-left:20rpx'>¥{{item.deduction_amount}}/{{reducetype[item.deduction_type]}}</text>
  367 + </view>
  368 + <view class='divide_line_f5f5f5' style="margin-top:6rpx"></view>
  369 + <text class='text_blue_28 float_right' style='line-height:90rpx;margin-left:40rpx' id='{{index}}' bindtap='showdetail'>查看</text>
  370 + <view class='float_right' wx:if="{{employee_status!='inactive'&&(item.status=='failed'||item.status=='to_declare')}}">
  371 + <text class='text_999_28' style='line-height:90rpx;margin-right:40rpx' id='{{index}}' bindtap='godelete'>删除</text>
  372 + <text class='text_blue_28 ' style='line-height:90rpx;' id='{{index}}' bindtap='goedit'>编辑</text>
  373 + </view>
377 374 </view>
378 375 </view>
379 376 </view>
380   -
381   - </view>
382   - <view wx:if="{{!additionInfo||additionInfo.length<1}}">
383   - <image style='width:55%;height:254rpx;margin:166rpx;' src='/images/noreduce_img.png'></image>
384 377 </view>
385   -
386 378 </view>
387   -
388   - <view class='bottom_btn_wrap' hidden="{{additionInfo&&additionInfo.length>0&&cur_status=='house_fund'&&house_type=='house_fund_loan'}}">
389   - <view class='btn_blue_radius' bindtap="goadd">
390   - <view class='text_white_34'>添加</view>
391   - </view>
  379 + <view wx:if="{{!additionInfo||additionInfo.length<1||(additionInfo[0].profession_items.length<1&&additionInfo[0].title_items.length<1)}}">
  380 + <image style='width:55%;height:254rpx;margin:166rpx;' src='/images/noreduce_img.png'></image>
392 381 </view>
393   -
394 382 </view>
395 383
396   -
397   - <view class="mask" catchtouchmove="preventTouchMove" hidden="{{!showModal_img&&!showModal_reducetype&&!showModal_addtype}}"></view>
398   - <!-- 申报说明 -->
399   - <view style='top:250rpx;position:absolute;z-index:10;width:325px;right:0;left:0;margin:auto' hidden="{{!showModal_img}}">
400   - <image class='modal_img' src="{{modal_images[cur_status]}}"></image>
401   - <!-- <text style='position:absolute;font-size:20px;color:#fff;float:right;top:0;right:100rpx' bindtap='closeModalImg'>x</text> -->
402   - <view style='width:80rpx;height:80rpx;position:absolute;float:right;top:0;right:0;display:flex;align-items:center;justify-content:center;'>
403   - <image style='width:30rpx;height:30rpx;' src='/images/close.png' bindtap='closeModalImg'></image>
  384 + <!-- <view class='bottom_btn_wrap' hidden="{{additionInfo.length>0&&((cur_status=='support_duty'&&(additionInfo[0].co_supporters.length>0||additionInfo[0].support_duties.length>0))||(cur_status=='house_fund'&&house_type=='house_fund_loan'))}}"> -->
  385 + <view class='bottom_btn_wrap' wx:if="{{btn_show&&employee_status!='inactive'}}" >
  386 + <view class='btn_blue_radius' bindtap="goadd">
  387 + <view class='text_white_34'>添加</view>
404 388 </view>
405 389 </view>
406 390
407   - <!-- 扣除类型 -->
408   - <view class='modal_lg' style='' wx:if="{{showModal_reducetype}}">
409   - <text class='text_modal_title'>请选择扣除方式</text>
410   - <view class='divide_line_f5f5f5'></view>
411   - <view style='width:100%;display:flex;flex-direction:column;align-items:center;'>
412   - <view wx:for="{{reducetypeData}}" wx:for-index="idx">
413   - <view wx:if="{{selected_reduceindex==idx}}">
414   - <text class='text_item_blue float_left'>{{item}}</text>
415   - <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
416   - </view>
417   - <view wx:else bindtap='goselect' id='{{idx}}'>
418   - <text class='text_item_black float_left'>{{item}}</text>
419   - </view>
420   - <view class='divide_line_f5f5f5'></view>
  391 + <view class="mask" hidden="{{!showModal_img&&!showModal_reducetype&&!showModal_addtype}}" bindtap='closeModalImg'></view>
  392 +<!-- 申报说明 -->
  393 +<view style='top:200rpx;position:absolute;z-index:10;width:325px;right:0;left:0;margin:auto' hidden="{{!showModal_img}}">
  394 + <image wx:if="{{cur_status!='house_fund'}}" class='modal_img' src="{{modal_images[cur_status]}}"></image>
  395 + <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_rent'}}" class='modal_img02' src="/images/house_declare_rent.png"></image>
  396 + <image wx:if="{{cur_status=='house_fund'&&house_type=='house_fund_loan'}}" class='modal_img' src="/images/house_declare_loan.png"></image>
  397 + <!-- <text style='position:absolute;font-size:20px;color:#fff;float:right;top:0;right:100rpx' bindtap='closeModalImg'>x</text> -->
  398 + <view style='width:80rpx;height:80rpx;position:absolute;float:right;top:0;right:0;display:flex;align-items:center;justify-content:center;' bindtap='closeModalImg'>
  399 + <image style='width:30rpx;height:30rpx;' src='/images/close.png'></image>
  400 + </view>
  401 +</view>
  402 +
  403 +<!-- 扣除类型 -->
  404 +<view class='modal_lg' style='' wx:if="{{showModal_reducetype}}">
  405 + <text class='text_modal_title'>请选择扣除方式</text>
  406 + <view class='divide_line_f5f5f5'></view>
  407 + <!-- <view style='width:100%;display:flex;flex-direction:column;align-items:center;'>
  408 + <view wx:for="{{reducetypeData}}" wx:for-index="idx">
  409 + <view wx:if="{{selected_reduceindex==idx}}">
  410 + <text class='text_item_blue float_left'>{{item}}</text>
  411 + <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
  412 + </view>
  413 + <view wx:else bindtap='goselect' id='{{idx}}'>
  414 + <text class='text_item_black float_left'>{{item}}</text>
421 415 </view>
  416 + <view class='divide_line_f5f5f5'></view>
422 417 </view>
423   - <view class='divide_line_f5f5f5'></view>
424   -
425   - <view style='width:100%;display: flex;'>
426   - <text class='text_cancel' bindtap='reduce_modalLeft'>取消</text>
427   - <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
428   - <text class='text_confirm' bindtap='reduce_modalRight'>确认</text>
  418 + </view> -->
  419 + <view style='width:100%;display:flex;flex-direction:column;max-height:560rpx;overflow-y: scroll;'>
  420 + <view wx:for="{{reducetypeData}}" wx:for-index="idx" bindtap='goselect' id="{{idx}}">
  421 + <view wx:if="{{idx==selected_reduceindex}}" style='display:flex;flex-direction:row;'>
  422 + <view class='text_item_blue float_left'>{{item}}</view>
  423 + <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
  424 + </view>
  425 + <view wx:else style='display:flex'>
  426 + <text class='text_item_black float_left'>{{item}}</text>
  427 + </view>
  428 + <view class='divide_line_f5f5f5'></view>
429 429 </view>
430 430 </view>
  431 + <view class='divide_line_f5f5f5'></view>
431 432
432   - <!-- 添加子女 老人 大病-->
433   - <view class='modal_lg' style='' wx:if="{{showModal_addtype}}">
434   - <text class='text_modal_title'>{{modalData.title}}</text>
435   - <view class='divide_line_f5f5f5'></view>
436   - <view style='width:100%;display:flex;flex-direction:column;align-items:center;'>
437   - <block wx:for="{{modalData.datas}}" wx:for-index="idx">
438   - <view wx:if="{{idx==selected_addindex}}">
439   - <text class='text_item_blue float_left'>{{item.name}}</text>
440   - <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
441   - </view>
442   - <view wx:else bindtap='goselect' id='{{idx}}'>
443   - <text class='text_item_black float_left'>{{item.name}}</text>
444   - </view>
445   - <view class='divide_line_f5f5f5'></view>
446   - </block>
447   - </view>
448   - <view class='divide_line_f5f5f5'></view>
449   - <view style='width:100%;display: flex;'>
450   - <text class='text_cancel01' bindtap='modalLeft'>{{modalData.lefttext}}</text>
451   - <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
452   - <text class='text_confirm01' bindtap='modalRight'>{{modalData.righttext}}</text>
  433 + <view style='width:100%;display: flex;'>
  434 + <text class='text_cancel' bindtap='reduce_modalLeft'>取消</text>
  435 + <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
  436 + <text class='text_confirm' bindtap='reduce_modalRight'>确认</text>
  437 + </view>
  438 +</view>
  439 +
  440 +<!-- 添加子女 老人 大病-->
  441 +<view class='modal_lg' style='' wx:if="{{showModal_addtype}}">
  442 + <text class='text_modal_title'>{{modalData.title}}</text>
  443 + <view class='divide_line_f5f5f5'></view>
  444 + <!-- <view style='width:100%;display:flex;flex-direction:column;align-items:center;'>
  445 + <block wx:for="{{modalData.datas}}" wx:for-index="idx">
  446 + <view wx:if="{{idx==selected_addindex}}">
  447 + <text class='text_item_blue float_left'>{{item.name}}</text>
  448 + <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
  449 + </view>
  450 + <view wx:else bindtap='goselect' id='{{idx}}'>
  451 + <text class='text_item_black float_left'>{{item.name}}</text>
  452 + </view>
  453 + <view class='divide_line_f5f5f5'></view>
  454 + </block>
  455 + </view> -->
  456 + <view style='width:100%;display:flex;flex-direction:column;max-height:560rpx;overflow-y: scroll;'>
  457 + <view wx:for="{{modalData.datas}}" wx:for-index="idx" bindtap='goselect' id="{{idx}}">
  458 + <view wx:if="{{idx==selected_addindex}}" style='display:flex;flex-direction:row;'>
  459 + <text class='text_item_blue float_left'>{{item.name}}</text>
  460 + <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
  461 + </view>
  462 + <view wx:else style='display:flex'>
  463 + <text class='text_item_black float_left'>{{item.name}}</text>
  464 + </view>
  465 + <view class='divide_line_f5f5f5'></view>
453 466 </view>
454   - </view>
\ No newline at end of file
  467 + </view>
  468 + <view class='divide_line_f5f5f5'></view>
  469 + <view style='width:100%;display: flex;'>
  470 + <text class='text_cancel01' bindtap='modalLeft'>{{modalData.lefttext}}</text>
  471 + <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
  472 + <text class='text_confirm01' bindtap='modalRight'>{{modalData.righttext}}</text>
  473 + </view>
  474 +</view>
  475 +
  476 +</view>
  477 +
  478 +
... ...
... ... @@ -166,6 +166,13 @@ page {
166 166 display: block;
167 167 }
168 168
  169 +.modal_img02 {
  170 + width: 325px;
  171 + height: 460px;
  172 + margin: 0 auto;
  173 + display: block;
  174 +}
  175 +
169 176 .modal_lg {
170 177 width: 72%;
171 178 position: fixed;
... ... @@ -253,6 +260,12 @@ page {
253 260 letter-spacing: 0;
254 261 line-height: 18px;
255 262 padding: 30rpx;
  263 +
  264 + width: 500rpx;
  265 + text-align: center;
  266 + overflow: hidden;
  267 + text-overflow: ellipsis;
  268 + white-space: nowrap;
256 269 }
257 270
258 271 .text_item_black {
... ... @@ -262,6 +275,12 @@ page {
262 275 letter-spacing: 0;
263 276 line-height: 18px;
264 277 padding: 30rpx;
  278 +
  279 + width: 500rpx;
  280 + text-align: center;
  281 + overflow: hidden;
  282 + text-overflow: ellipsis;
  283 + white-space: nowrap;
265 284 }
266 285
267 286 .declare_style {
... ... @@ -279,6 +298,21 @@ page {
279 298 float: right;
280 299 }
281 300
  301 +.declare_style_new {
  302 + width: 144rpx;
  303 + height: 48rpx;
  304 + border-radius: 20px 0px 0px 20px;
  305 + font-family: PingFangSC-Regular;
  306 + font-size: 13px;
  307 + color: #fff;
  308 + text-align: center;
  309 + align-items: center;
  310 + justify-content: center;
  311 + line-height: 48rpx;
  312 + margin-top:16rpx;
  313 + float: right;
  314 +}
  315 +
282 316 .orange_bg {
283 317 background: #f5a623;
284 318 }
... ...
... ... @@ -32,12 +32,9 @@ Page({
32 32 },
33 33 success: function (result) {
34 34 console.log('成功', result)
35   - if (result.personal_income){
36   - self.setData({
37   - taxDatas: result.data
38   - })
39   - }
40   -
  35 + self.setData({
  36 + taxDatas: result.data
  37 + })
41 38 },
42 39 fail: function (res) {
43 40 console.log('失败', res)
... ...
... ... @@ -62,12 +62,12 @@
62 62 <view class='view_bg_wrap' style='margin-top: 44rpx;'>
63 63 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
64 64 <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
65   - <text class='text_text_wrap'>累计应预扣预缴税额</text>
  65 + <text class='text_text_wrap'>累计应缴税额</text>
66 66 </view>
67 67 <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
68 68 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
69 69 <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
70   - <text class='text_text_wrap'>已预扣预缴税额</text>
  70 + <text class='text_text_wrap'>已缴税额</text>
71 71 </view>
72 72
73 73 </view>
... ... @@ -75,7 +75,7 @@
75 75 <view class='view_bg_wrap' style='margin-top: 180rpx;'>
76 76 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
77 77 <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
78   - <text class='text_text_wrap'>本期应预扣预缴税额</text>
  78 + <text class='text_text_wrap'>本期应缴税额</text>
79 79 </view>
80 80
81 81 <!-- <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
... ...
... ... @@ -31,7 +31,7 @@ Page({
31 31 wx.showLoading()
32 32 that.loadCount = 2
33 33 wx.request({
34   - url: baseUrl + "payroll/v1/tax/person-records",
  34 + url: baseUrl + "payroll/v1/tax/person-records?global=true",
35 35 header: {
36 36 'Authorization': this.Authorization
37 37 },
... ... @@ -56,7 +56,7 @@ Page({
56 56 }
57 57 })
58 58 wx.request({
59   - url: baseUrl + "payroll/v1/salary/person-records",
  59 + url: baseUrl + "payroll/v1/salary/person-records?global=true",
60 60 header: {
61 61 'Authorization': this.Authorization
62 62 },
... ... @@ -87,13 +87,16 @@ Page({
87 87 var item = items[i]
88 88 var method
89 89 if (item.taxation_method == '0101'){
90   - if (item.sub_taxation_method && Sub_taxation_method[item.sub_taxation_method]){
91   - method = '工资薪金-' + Sub_taxation_method[item.sub_taxation_method]
92   - }
  90 + method = '工资薪金'
  91 + // if (item.sub_taxation_method && Sub_taxation_method[item.sub_taxation_method]){
  92 + // method = '工资薪金-' + Sub_taxation_method[item.sub_taxation_method]
  93 + // }
93 94 } else if (item.taxation_method == '0401') {
94 95 method = '劳务报酬'
95   - }
96   - item.method
  96 + } else if (item.taxation_method == '0103') {
  97 + method = '全年一次性奖金'
  98 + }
  99 + item.method = method
97 100 }
98 101 return items;
99 102 },
... ...
... ... @@ -20,15 +20,16 @@
20 20 <view style='width:100%; font-family: PingFang-SC-Medium;font-size: 14px;color: #999999;letter-spacing: 0;text-align: center;'>还没有企业为您申报个税哦~</view>
21 21 </view>
22 22 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
23   - <view class='card_rectangle_bg_column' style='padding:30rpx' id='{s{item.id}}' bindtap='goItemDetails'>
24   - <text class='text_blue_36'>所得项目:{{item.method}}</text>
  23 + <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'>
  24 + <text class='text_blue_36'>扣缴义务人: {{item.declaring_unit}}</text>
  25 + <text class='text_blue_36'>所得项目: {{item.method}}</text>
25 26 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
26 27 <!-- <text class='text_999_28'>累计收入额:{{item.personal_income}}</text> -->
27 28 <text class='text_999_28'>当期收入额:<text class='text_333_28 left_360'>¥{{item.personal_income}}</text></text>
28 29 <text class='text_999_28'>累计应缴纳所得额:<text class='text_333_28 left_360'>¥{{item.accumulated_taxable_income}}</text></text>
29 30 <text class='text_999_28'>累计应扣缴税额:<text class='text_333_28 left_360'>¥{{item.accumulated_withholding_tax}}</text></text>
30 31 <text class='text_999_28'>已预交税额:<text class='text_333_28 left_360'>¥{{item.prepay_tax}}</text></text>
31   - <text class='text_999_28'>本期应缴税额:<text class='text_333_28 text_color_28 left_360'>¥{{item.personal_tax}}</text></text>
  32 + <text class='text_999_28'>本期应缴税额:<text class='text_333_28 text_color_28 left_360'>¥{{item.refund_tax}}</text></text>
32 33 </view>
33 34 </view>
34 35 </view>
... ...
... ... @@ -57,15 +57,15 @@
57 57 .head_image_wrap_down {
58 58 width: 24rpx;
59 59 height: 16rpx;
60   - margin-top: 24rpx;
  60 + margin-top: 18rpx;
61 61 float:right;
62 62 }
63 63
64 64 .head_image_wrap_up {
65   - width: 26rpx;
66   - height: 20rpx;
  65 + width: 24rpx;
  66 + height: 16rpx;
67 67 float:right;
68   - margin-top:20rpx
  68 + margin-top:18rpx
69 69 }
70 70
71 71 .payment_img_bg {
... ...
... ... @@ -20,7 +20,7 @@ Page({
20 20 onLoad: function(options) {
21 21 var mydate = new Date();
22 22 this.setData({
23   - choosed_date: mydate.getFullYear() + "年" ,
  23 + choosed_date: mydate.getFullYear() + "年",
24 24 long_date: mydate.getTime() / 1000
25 25 })
26 26
... ... @@ -37,13 +37,13 @@ Page({
37 37 animation: true,
38 38 canvasId: 'pieCanvas',
39 39 type: 'pie',
40   - series: [ {
41   - name: '子女教育可扣除金额',
42   - data: 35,
43   - }, {
  40 + series: [{
  41 + name: '子女教育可扣除金额',
  42 + data: 35,
  43 + }, {
44 44 name: '子女教育已扣除金额',
45   - data: 78,
46   - },
  45 + data: 78,
  46 + },
47 47 {
48 48 name: '继续教育可扣除金额',
49 49 data: 35,
... ... @@ -76,7 +76,8 @@ Page({
76 76 }, {
77 77 name: '剩余扣除额度已扣除金额',
78 78 data: 78,
79   - },],
  79 + },
  80 + ],
80 81 width: windowWidth,
81 82 height: 320,
82 83 dataLabel: true,
... ... @@ -103,21 +104,21 @@ Page({
103 104 })
104 105 },
105 106
106   - gohistory: function (e) {
  107 + gohistory: function(e) {
107 108 wx.navigateTo({
108 109 url: 'historylist/historylist',
109 110 })
110 111 },
111 112
112   - datePickerChange: function (e) {
  113 + datePickerChange: function(e) {
113 114 console.log("e", e)
114 115 var datelong = Date.parse(new Date(e.detail.value)) / 1000
115 116 console.log('datelong', datelong)
116 117 this.setData({
117 118 long_date: datelong,
118   - choosed_date: format.yearFormString(datelong) + "年"
  119 + choosed_date: format.yearFormString(datelong) + "年"
119 120 })
120   - },
  121 + },
121 122
122 123 /**
123 124 * Lifecycle function--Called when page hide
... ...
... ... @@ -26,7 +26,7 @@
26 26 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
27 27 </view>
28 28
29   - <!-- <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='goAdvancePayment'>
  29 + <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='goAdvancePayment'>
30 30 <image class="icon_wrap" src="/images/advance_payment.png"></image>
31 31 <view style='width:1px;height:140rpx;background-color:#e5e5e5;margin-left:40rpx'></view>
32 32 <view style='display:flex;flex-direction: column;width:440rpx;margin-left:30rpx;align-self:center;'>
... ... @@ -34,7 +34,7 @@
34 34 <text style='font-size:28rpx;color: #999;margin-top:6rpx'>查看本人的个税扣缴明细</text>
35 35 </view>
36 36 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
37   - </view> -->
  37 + </view>
38 38
39 39 <!-- <view class='card_rectangle_bg_row' style='margin-top:30rpx;padding:30rpx' bindtap='goFinalPayment'>
40 40 <image class="icon_wrap" src="/images/final_payment.png"></image>
... ... @@ -58,6 +58,6 @@
58 58 </view>
59 59 </scroll-view>
60 60
61   - <!-- <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image> -->
  61 + <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image>
62 62
63 63 </view>
\ No newline at end of file
... ...
... ... @@ -8,11 +8,11 @@ Page({
8 8 */
9 9 data: {
10 10 showModal: false,
  11 + canTap: true,
11 12 inputValue: "",
12 13 comlist: [],
13 14 com_id: "",
14 15 choosed_index: 0,
15   - chat_idx:"Toview"+0,
16 16 chatlist: []
17 17 },
18 18
... ... @@ -21,6 +21,12 @@ Page({
21 21 */
22 22 onLoad: function(options) {
23 23 this.getComList()
  24 + // var that = this
  25 + // wx.getSystemInfo({
  26 + // success: function (res) {
  27 + // console.log("windowHeight",res.windowHeight)
  28 + // }
  29 + // })
24 30 },
25 31
26 32 /**
... ... @@ -33,8 +39,8 @@ Page({
33 39 /**
34 40 * Lifecycle function--Called when page show
35 41 */
36   - onShow: function() {
37   -
  42 + onShow: function(e) {
  43 + console.log("e---", e)
38 44 },
39 45
40 46 getComList: function() {
... ... @@ -76,10 +82,19 @@ Page({
76 82 if (this.data.inputValue == "" || this.data.inputValue.replace(/(^\s*)|(\s*$)/g, "") == "") {
77 83 wx.showToast({
78 84 title: '请输入内容',
  85 + icon: "none",
79 86 })
80 87 return
81 88 }
  89 + if (this.data.canTap) {
  90 + this.setData({
  91 + canTap: false
  92 + })
  93 + } else {
  94 + return
  95 + }
82 96 var Authorization = app.globalData.Authorization;
  97 + console.log("Authorization", Authorization)
83 98 wx.request({
84 99 url: baseUrl + 'chatbot/v1/chats',
85 100 data: {
... ... @@ -100,13 +115,28 @@ Page({
100 115 that.data.chatlist.push(res.data)
101 116 that.setData({
102 117 inputValue: "",
103   - chat_idx: "Toview"+that.data.chatlist.length,
104 118 chatlist: that.data.chatlist
105 119 })
106 120 console.log("chatlist", that.data.chatlist)
  121 + // wx.pageScrollTo({
  122 + // scrollTop: 999999,
  123 + // duration: 300
  124 + // })
107 125 // that.getChatinfo()
108   - that.bottom()
  126 + setTimeout(function() {
  127 + that.bottom()
  128 + that.setData({
  129 + canTap: true
  130 + })
  131 + }, 400);
109 132 }
  133 + },
  134 + complete: function(res) {
  135 + setTimeout(function() {
  136 + that.setData({
  137 + canTap: true
  138 + })
  139 + }, 1000);
110 140 }
111 141 })
112 142 },
... ... @@ -139,6 +169,11 @@ Page({
139 169
140 170 app.configOssUrl();
141 171 that.getChatinfo();
  172 + },
  173 + complete: function(res) {
  174 + wx.showLoading({
  175 + title: '',
  176 + })
142 177 }
143 178 })
144 179 },
... ... @@ -146,24 +181,32 @@ Page({
146 181 getChatinfo: function() {
147 182 var that = this;
148 183 var Authorization = app.globalData.Authorization;
  184 + console.log("Authorization", Authorization)
149 185 wx.request({
150 186 url: baseUrl + 'chatbot/v1/chats',
151   - data: {},
152 187 method: "GET",
153 188 header: {
154 189 'content-type': 'application/json',
155 190 "Authorization": Authorization
156 191 },
157 192 success: function(res) {
158   - if (res && res.data) {
159   - console.log("getChatinfo", res)
  193 + console.log("getChatinfo", res)
  194 + if (res.data && res.data.items && res.data.items.length > 0) {
160 195 that.setData({
161   - chat_idx: "Toview"+res.data.items.length,
162 196 chatlist: res.data.items.reverse()
163 197 })
164 198 that.bottom()
  199 + }else{
  200 + var orilist = []
  201 + var oribean = {}
  202 + oribean.type = "0"
  203 + oribean.text = "Hi,我是社税小助手,请问您需要什么帮助?我知道的可多了,税法、政策、资讯,帮您计算个税、查询您的工资明细,只要告诉我就可以了"
  204 + orilist.push(oribean)
  205 + that.setData({
  206 + chatlist: orilist
  207 + })
165 208 }
166   - }
  209 + },
167 210 })
168 211 },
169 212
... ... @@ -183,7 +226,13 @@ Page({
183 226 this.setData({
184 227 showModal: false,
185 228 })
186   - this.refreshToken();
  229 + // var requestdata = {
  230 + // "grant_type": "refresh_token",
  231 + // "refresh_token": app.globalData.refresh_token,
  232 + // "scope": "global_access:end_user,tenant:" + this.data.com_id
  233 + // };
  234 + this.refreshToken()
  235 + // this.getChatinfo();
187 236 },
188 237
189 238 bindChange: function(e) {
... ... @@ -194,21 +243,27 @@ Page({
194 243 com_id: this.data.comlist[s].id,
195 244 choosed_index: s
196 245 })
  246 + app.globalData.com_id = this.data.comlist[s].id;
197 247 },
198 248
199 249 //聊天消息始终显示最底端
200   - bottom: function () {
201   - var query = wx.createSelectorQuery()
202   - query.select('#flag').boundingClientRect()
203   - query.selectViewport().scrollOffset()
204   - query.exec(function (res) {
  250 + bottom: function() {
  251 + // var query = wx.createSelectorQuery()
  252 + // query.select('#flag').boundingClientRect()
  253 + // query.selectViewport().scrollOffset()
  254 + // query.exec(function (res) {
  255 + // wx.pageScrollTo({
  256 + // scrollTop: res[0].bottom // #the-id节点的下边界坐标
  257 + // })
  258 + // res[1].scrollTop // 显示区域的竖直滚动位置
  259 + // })
  260 + wx.createSelectorQuery().select('#flag').boundingClientRect(function(rect) {
  261 + // 使页面滚动到底部
205 262 wx.pageScrollTo({
206   - scrollTop: res[0].bottom // #the-id节点的下边界坐标
  263 + scrollTop: rect.height + 9999999,
  264 + duration: 100
207 265 })
208   - res[1].scrollTop // 显示区域的竖直滚动位置
209   - })
210   - // var d = SmsListView.ActualHeight;
211   - // xxx.ScrollToVerticalOffset(d);
  266 + }).exec()
212 267 },
213 268
214 269 /**
... ...
1 1 <!--pages/main/smartchat/chat.wxml-->
2   -<import src="../../../common/picker_cell" />
3   -
4 2 <view>
5   - <scroll-view style='background:#fff;margin-bottom:150rpx' scroll-y="true" >
  3 + <view style='background:#fff;padding-bottom:65px;'>
6 4 <view wx:for="{{chatlist}}" wx:for-item="item" style='display:flex;flex-direction:column'>
7 5 <view style='margin:50rpx 60rpx 0 36rpx;display:flex;flex-direction:row' wx:if="{{item.type=='0'}}">
8 6 <image style='width:102rpx;height:92rpx' src="/images/icon_robot.png"></image>
... ... @@ -19,27 +17,27 @@
19 17 </view>
20 18 </view>
21 19 </view>
22   - <view id="flag"></view>
23   -
24   - </scroll-view>
  20 + <view id="flag"></view>
  21 + </view>
25 22 <view class='bottom_wrap' id='bottom'>
26 23 <input class='input_wrap' placeholder-class='input_placeholder_wrap' bindinput="bindKeyInput" placeholder='请输入您要咨询的问题' value='{{inputValue}}'></input>
27 24 <view class='btn_send_wrap' bindtap='sendMsg'>发送</view>
28 25 </view>
29 26 </view>
30 27
  28 +
31 29 <!-- 自定义弹窗 -->
32   -<view class="mask" catchtouchmove="preventTouchMove" hidden="{{!showModal}}"></view>
  30 +<view class="mask" hidden="{{!showModal}}"></view>
33 31 <view class='modal_lg' hidden="{{!showModal}}">
34 32 <text class="text_title">您在多个单位有任职信息,请选择您要在哪家单位咨询问题。</text>
35 33 <view class='divide_line_f5f5f5'></view>
36   - <view style='width:100%;display:flex;flex-direction:column;max-height:688rpx;'>
  34 + <view style='width:100%;display:flex;flex-direction:column;max-height:560rpx;overflow-y: scroll;'>
37 35 <view wx:for="{{comlist}}" wx:for-index="idx" bindtap='bindChange' id="{{idx}}">
38 36 <view wx:if="{{idx==choosed_index}}" style='padding:30rpx;display:flex;flex-direction:row;'>
39 37 <view class='text_item_blue float_left'>{{item.name}}</view>
40 38 <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
41 39 </view>
42   - <view wx:else style='padding:30rpx ;display:flex;'>
  40 + <view wx:else style='padding:30rpx ;display:flex'>
43 41 <text class='text_item_black float_left'>{{item.name}}</text>
44 42 </view>
45 43 <view class='divide_line_f5f5f5'></view>
... ...
... ... @@ -177,7 +177,7 @@
177 177 letter-spacing: 0;
178 178 }
179 179
180   -#flag{
181   -margin-bottom: 10rpx;
182   -height: 10rpx;
  180 +#flag {
  181 + margin-bottom: 10rpx;
  182 + height: 10rpx;
183 183 }
... ...
... ... @@ -30,7 +30,8 @@ Page({
30 30 selected: '',
31 31 disabled: false,
32 32 placeholder: '请选择关系',
33   - values: ["子","女" ,"配偶", "父母", "祖父母、外祖父母"],
  33 + // values: ["子","女" ,"配偶", "父母", "祖父母、外祖父母"],
  34 + values: ["子", "女", "配偶", "父母","其他"],
34 35 onChange: 'onPickerSelect'
35 36 },
36 37 cardtypeData: {
... ... @@ -57,8 +58,10 @@ Page({
57 58 genderData: {
58 59 label: '性别',
59 60 bindtype: 'gender',
  61 + disabled: true,
60 62 selected: '',
61   - placeholder: '请选择性别',
  63 + // placeholder: '请选择性别',
  64 + placeholder: '性别',
62 65 values: ["男", "女"],
63 66 onChange: 'onPickerSelect'
64 67 },
... ... @@ -110,12 +113,12 @@ Page({
110 113 //对各参数初始赋值
111 114 handleDatas: function (tax_info) {
112 115
113   - var isDisable = tax_info.certification_status == 'active'//已通过拍摄身份证认证过,不能修改
  116 + var isDisable = tax_info.certification_status == 'active' && tax_info.id_card_no.length//已通过拍摄身份证认证过,不能修改
114 117
115 118 this.data.relativeData.selected = tax_info.family_ties
116 119 // this.data.cardtypeData.selected = tax_info.id_card_type
117 120 this.data.genderData.selected = tax_info.gender
118   - this.data.genderData.disabled = isDisable
  121 + // this.data.genderData.disabled = isDisable
119 122
120 123 this.setData({
121 124 isDisable: isDisable,
... ... @@ -233,13 +236,14 @@ Page({
233 236
234 237 },
235 238 bindinputmobile: function (e) {
236   - console.log('bindinputmobile', e)
  239 + if (e.detail.value.length == 11 && !format.isMobile(e.detail.value)){
  240 + this.showtoast("手机号码有误")
  241 + }
237 242 this.setData({
238 243 mobile: e.detail.value
239 244 })
240 245 },
241 246 nameInput: function (e) {
242   - console.log('bindinputname', e)
243 247 this.setData({
244 248 name: e.detail.value
245 249 })
... ... @@ -263,18 +267,27 @@ Page({
263 267 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$");
264 268 var formdata = e.detail.value;
265 269 console.log("formdata", formdata);
266   - console.log('idnum', this.data.card_number.length < 1 && !format.isIDCardNum(formdata.id_card_no))
267 270 if (this.data.relativeData.selected.length < 1) {
268 271 this.showtoast('请选择关系');
269 272 return
270 273 }
271   - else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
  274 + if (this.data.card_number.length < 1) {
272 275 this.showtoast('请填写证照号码');
273 276 return
274   - } else if (this.data.isIdCard && !format.isIDCardNum(formdata.id_card_no)) {
  277 + } else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {
275 278 this.showtoast('证照号码有误');
276 279 return
277 280 }
  281 + var rel = this.data.relativeData.selected
  282 + var hostInfo = format.analyzeIDCard(app.globalData.hostInfo.id_card_no)
  283 + if ((rel == '子' || rel =='女') && formdata.age > hostInfo.age) {
  284 + this.showtoast('子女年龄有误');
  285 + return
  286 + }
  287 + if (rel == '父母' && formdata.age < hostInfo.age) {
  288 + this.showtoast('父母年龄有误');
  289 + return
  290 + }
278 291 var name = formdata.person_name.length ? formdata.person_name : this.data.name
279 292 if (name.length < 1 ) {
280 293 this.showtoast('姓名未填写');
... ... @@ -287,22 +300,21 @@ Page({
287 300 this.showtoast('手机号码有误');
288 301 return
289 302 }
290   - var new_card_num = ''
291   - if (this.data.isIdCard) {
292   - if (this.data.card_number.length > 0) {
293   - new_card_num = this.data.card_number
  303 + if (this.data.genderData.selected == '男') {
  304 + if (rel == '女'){
  305 + this.showtoast('关系和性别冲突');
  306 + return
294 307 }
295   - if (formdata.id_card_no.length > 0) {
296   - new_card_num = formdata.id_card_no
  308 + }else{
  309 + if (rel == '子') {
  310 + this.showtoast('关系和性别冲突');
  311 + return
297 312 }
  313 + }
  314 + if (rel == '配偶' && this.data.genderData.selected == app.globalData.hostInfo.gender) {
  315 + this.showtoast('关系和性别冲突');
  316 + return
298 317 }
299   -
300   - if (!this.data.isIdCard && formdata.id_card_no && formdata.id_card_no.length > 0) {
301   - new_card_num = formdata.id_card_no
302   - }
303   - this.setData({
304   - card_number: new_card_num,
305   - })
306 318 this.goCommit(formdata);
307 319 },
308 320
... ... @@ -327,7 +339,7 @@ Page({
327 339 'certification_status': that.getCertifyStatus(formdata),
328 340 "family_ties": that.data.relativeData.selected,
329 341 "id_card_type": '居民身份证',//that.data.cardtypeData.selected,
330   - "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number,
  342 + "id_card_no": that.data.card_number,
331 343 "name": name,
332 344 "gender": that.data.genderData.selected,
333 345 "mobile": formdata.mobile,
... ... @@ -403,6 +415,9 @@ Page({
403 415 idChange: function (e) {
404 416 console.log('idCardNoChange', e.detail.value)
405 417 var idCardNo = e.detail.value
  418 + this.setData({
  419 + card_number: idCardNo
  420 + })
406 421 if (e.detail.value.length == 18){
407 422 if (!format.isIDCardNum(idCardNo)) {
408 423 wx.showToast({
... ... @@ -415,8 +430,10 @@ Page({
415 430 }
416 431 },
417 432 idDone: function (e) {
418   -
419 433 var idCardNo = e.detail.value
  434 + this.setData({
  435 + card_number: idCardNo
  436 + })
420 437 if (!idCardNo.length) {
421 438 wx.showToast({
422 439 image: "../../../../images/warn.png",
... ... @@ -431,7 +448,6 @@ Page({
431 448 })
432 449 return;
433 450 }
434   -
435 451 },
436 452
437 453 /**
... ...
... ... @@ -24,10 +24,10 @@
24 24 <view wx:if="{{isIdCard}}" >
25 25 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo'></image>
26 26 <!-- <text class='text_333_28 float_right'>{{card_number}}</text> -->
27   - <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}}' type='idcard'></input>
  27 + <input class='input_wrap' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}' type='idcard' ></input>
28 28 </view>
29 29 <view wx:else>
30   - <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>
  30 + <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='id_card_no' maxlength='18' type="idcard" value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input>
31 31 </view>
32 32 </view>
33 33 <view class="divide_line_30"></view>
... ... @@ -35,7 +35,7 @@
35 35 <view class='item_body'>
36 36 <text class='red_star_right_10'>*</text>
37 37 <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text>
38   - <input class='input_wrap float_right' placeholder='请填写姓名' name='person_name' value='{{name}}' placeholder-class='text_777_30' maxlength='15' disabled='{{isDisable}}' bindinput='nameInput'></input>
  38 + <input class='input_wrap' placeholder='请填写姓名' name='person_name' value='{{name}}' placeholder-class='text_999_30' maxlength='15' disabled='{{isDisable}}' bindinput='nameInput'></input>
39 39 </view>
40 40 <view class="divide_line_30"></view>
41 41
... ... @@ -43,7 +43,7 @@
43 43 <view class="divide_line_30"></view>
44 44 <view class='item_body'>
45 45 <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>年龄</text>
46   - <input class='input_wrap float_right' name='age' type='number' placeholder-class='text_777_30' placeholder='请输入年龄' maxlength='2' value='{{age}}' disabled='{{isDisable}}'></input>
  46 + <input class='input_wrap' name='age' type='number' placeholder-class='text_999_30' placeholder='年龄' maxlength='2' value='{{age}}' disabled='true'></input>
47 47 </view>
48 48 <view class="divide_line_30"></view>
49 49
... ... @@ -55,16 +55,16 @@
55 55 </view>
56 56 <view class="divide_line_30"></view>
57 57 <view class='item_body'>
58   - <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>手机号码</text>
59   - <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input>
  58 + <text class='red_star_right_10'>*</text>
  59 + <text class='text_777_30 float_left' style='line-height: 90rpx'>是否境外人员</text>
  60 + <text class='text_black_30 float_right' style='line-height: 90rpx' >否</text>
60 61 </view>
  62 + <!-- <template is="picker_cell_normal" data="{{...forignerInfo}}" /> -->
61 63 <view class="divide_line_30"></view>
62 64 <view class='item_body'>
63   - <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>是否境外人员</text>
64   - <text class='text_black_30 float_right' style='line-height: 90rpx' >否</text>
  65 + <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>联系电话</text>
  66 + <input class='input_wrap' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input>
65 67 </view>
66   - <!-- <template is="picker_cell_normal" data="{{...forignerInfo}}" /> -->
67   -
68 68 </view>
69 69 </view>
70 70
... ...
... ... @@ -68,6 +68,9 @@ page{
68 68
69 69 .input_wrap {
70 70 /* max-width: 460rpx; */
  71 + -webkit-box-flex: 1;
  72 + -webkit-flex: 1;
  73 + flex: 1;
71 74 height: 90rpx;
72 75 font-size: 28rpx;
73 76 color: #000;
... ...
... ... @@ -74,7 +74,8 @@ Page({
74 74 genderData: {
75 75 label: '性别',
76 76 bindtype: 'gender',
77   - placeholder: '请选择性别',
  77 + disabled: true,
  78 + placeholder: '性别',
78 79 values: ["男", "女"],
79 80 selected: '',
80 81 onChange: 'onPickerSelect'
... ... @@ -159,8 +160,9 @@ Page({
159 160 // 时间picker
160 161 birthDate: {
161 162 label: '出生年月',
  163 + disabled:true,
162 164 bindtype: 'birthday',
163   - placeholder: '请选择出生日期',
  165 + placeholder: '出生日期',
164 166 selected: '',
165 167 mode: "date",
166 168 fields: "day",
... ... @@ -276,7 +278,7 @@ Page({
276 278 console.log('curdate', curdate)
277 279
278 280 this.data.name = tax_info.name
279   - if (tax_info.certification_status == 'active') {//已通过拍摄身份证认证过,不能修改
  281 + if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) {//已通过拍摄身份证认证过,不能修改
280 282 this.data.genderData.disabled = true
281 283 this.data.birthDate.disabled = true
282 284 this.data.cardtypeData.disabled = true
... ... @@ -333,8 +335,8 @@ Page({
333 335 specificIndustryInfo: this.data.specificIndustryInfo,
334 336 genderData: this.data.genderData,
335 337 bankInfo: this.data.bankInfo,
336   - personal_equity_total:tax_info.personal_equity_total,
337   - company_equity_total: tax_info.company_equity_total,
  338 + personal_equity_total: tax_info.personal_equity_total ? tax_info.personal_equity_total : 0,
  339 + company_equity_total: tax_info.company_equity_total ? tax_info.company_equity_total: 0,
338 340
339 341 professionData: this.data.professionData,
340 342 degreeData: this.data.degreeData,
... ... @@ -349,9 +351,9 @@ Page({
349 351
350 352 long_birth_date: tax_info.birth_date,
351 353 birthDate: this.data.birthDate,
352   - long_start_date: tax_info.join_date,
  354 + long_start_date: tax_info.join_date ? tax_info.join_date:0,
353 355 startDate: this.data.startDate,
354   - long_end_date: tax_info.separate_date,
  356 + long_end_date: tax_info.separate_date ? tax_info.separate_date : 0,
355 357 endDate: this.data.endDate,
356 358 isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
357 359 card_number: this.data.card_number
... ... @@ -458,7 +460,7 @@ Page({
458 460 bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
459 461
460 462 that.setData({
461   - banklist: res.data.items,
  463 + // banklist: res.data.items,
462 464 bankInfo: bank_info
463 465 })
464 466 console.log("bankInfo", that.data.bankInfo)
... ... @@ -771,14 +773,15 @@ Page({
771 773 },
772 774
773 775 bindinputmobile: function(e) {
774   - console.log('bindinputmobile', e)
  776 + if (e.detail.value.length == 11 && !format.isMobile(e.detail.value)) {
  777 + this.showtoast("手机号码有误")
  778 + }
775 779 this.setData({
776 780 mobile: e.detail.value
777 781 })
778 782 },
779 783
780 784 bindinputname: function(e) {
781   - console.log('bindinputname', e)
782 785 this.setData({
783 786 name: e.detail.value
784 787 })
... ... @@ -786,6 +789,16 @@ Page({
786 789
787 790 idcardblur: function (e) {
788 791 var idCardNo = e.detail.value
  792 + this.setData({
  793 + card_number: idCardNo
  794 + })
  795 + if (!idCardNo.length) {
  796 + wx.showToast({
  797 + image: "../../../../images/warn.png",
  798 + title: '请输入身份证号'
  799 + })
  800 + return;
  801 + }
789 802 if (!format.isIDCardNum(idCardNo)) {
790 803 wx.showToast({
791 804 image: "../../../../images/warn.png",
... ... @@ -793,10 +806,12 @@ Page({
793 806 })
794 807 return;
795 808 }
796   - this.dealIdInfo(idCardNo)
797 809 },
798 810 bindinputcardnum: function(e) {
799 811 var idCardNo = e.detail.value
  812 + this.setData({
  813 + card_number: idCardNo
  814 + })
800 815 if (e.detail.value.length == 18) {
801 816 if (!format.isIDCardNum(idCardNo)) {
802 817 wx.showToast({
... ... @@ -811,9 +826,22 @@ Page({
811 826 //根据身份证号码,获取相关信息
812 827 dealIdInfo: function (idCardNum) {
813 828 var info = format.analyzeIDCard(idCardNum)
814   - this.setData({
815   - card_number: idCardNum
816   - })
  829 + console.log('info', info.age, info.sex)
  830 + if (info.age) {
  831 + this.data.birthDate.selected = info.birthDay
  832 + this.setData({
  833 + age: info.age,
  834 + long_birth_date: Date.parse(new Date(info.birthDay)) / 1000,
  835 + birthDate: this.data.birthDate
  836 + })
  837 + }
  838 + if (info.sex) {
  839 + var gender_data = this.data.genderData
  840 + gender_data.selected = info.sex
  841 + this.setData({
  842 + genderData: gender_data
  843 + })
  844 + }
817 845 },
818 846 personalmoney:function(e){
819 847 console.log('personalmoney', e)
... ... @@ -838,9 +866,8 @@ Page({
838 866 var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
839 867 var formdata = e.detail.value;
840 868 console.log("formdata", formdata)
841   - console.log("card_number", this.data.card_number)
842 869 if (this.data.card_number.length < 1) {
843   - this.showtoast('请输入身份证号码');
  870 + this.showtoast('请填写证照号码');
844 871 return
845 872 } else if (this.data.isIdCard && this.data.card_number.length > 0 && !format.isIDCardNum(this.data.card_number)) {
846 873 this.showtoast('证照号码有误');
... ... @@ -853,6 +880,53 @@ Page({
853 880 this.showtoast('请输入正确姓名');
854 881 return
855 882 }
  883 + if (this.data.mobile.length < 1) {
  884 + this.showtoast('请输入手机号码');
  885 + return
  886 + } else if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) {
  887 + this.showtoast('手机号码有误');
  888 + return
  889 + }
  890 + if (this.data.curAddress_haschanged || this.data.taxInfo.current_address.province_code) {//选择了地址
  891 + if (formdata.current_address_detail.length < 1) {
  892 + this.showtoast('请填写详细居住地址');
  893 + return
  894 + }
  895 + }
  896 + if (this.data.birthAddress_haschanged || this.data.taxInfo.huji_address.province_code) {//选择了地址
  897 + if (formdata.huji_address_detail.length < 1) {
  898 + this.showtoast('请填写详细户籍地址');
  899 + return
  900 + }
  901 + }
  902 +
  903 + // if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
  904 + // this.showtoast('邮箱格式有误');
  905 + // return
  906 + // }
  907 + // if (formdata.email && formdata.email.length > 0 && !format.checkEmail(formdata.email)) {
  908 + // this.showtoast('邮箱格式有误');
  909 + // return
  910 + // }
  911 + if (formdata.bank_account && formdata.bank_account.length > 0) {
  912 + if (!format.banknoCheck(formdata.bank_account)){
  913 + wx.showToast({
  914 + title: '银行卡号格式有误',
  915 + duration: 2000,
  916 + icon: 'none'
  917 + })
  918 + return
  919 + }
  920 + if (!this.data.bankInfo.selected) {
  921 + wx.showToast({
  922 + title: '请选择开户银行',
  923 + duration: 2000,
  924 + icon: 'none'
  925 + })
  926 + return
  927 + }
  928 + }
  929 + this.goCommit(formdata);
856 930 // else if (this.data.personstatusData.selected.length < 1) {
857 931 // this.showtoast('有必填项未填写');
858 932 // return
... ... @@ -869,17 +943,6 @@ Page({
869 943 // this.showtoast('有必填项未填写');
870 944 // return
871 945 // } else
872   - if (this.data.mobile.length < 1) {
873   - this.showtoast('请输入手机号码');
874   - return
875   - } else if (this.data.mobile.length > 0 && !regMobile.test(this.data.mobile)) {
876   - this.showtoast('手机号码有误');
877   - return
878   - }
879   - // if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
880   - // this.showtoast('请输入正确邮箱');
881   - // return
882   - // }
883 946 //else if (this.data.investInfo.selected.length < 1) {
884 947 // this.showtoast('有必填项未填写');
885 948 // return
... ... @@ -908,7 +971,6 @@ Page({
908 971 // this.setData({
909 972 // card_number: new_ard_num,
910 973 // })
911   - this.goCommit(formdata);
912 974 },
913 975
914 976 goCommit: function(data) {
... ... @@ -920,8 +982,6 @@ Page({
920 982 var request_current_address = that.getCurrentAddressRequest()
921 983 var request_birth_address = that.getBirthAddressRequest()
922 984 var Authorization = app.globalData.Authorization;
923   - console.log('long_birth_date', that.data.long_birth_date)
924   -
925 985 wx.request({
926 986 url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id,
927 987 method: "PUT",
... ... @@ -983,11 +1043,10 @@ Page({
983 1043 // ({
984 1044 // url: '../home/home',
985 1045 // })
986   - } else {
987   - wx.showModal({
988   - title: res.data.message,
989   - content: '',
990   - })
  1046 + } else if (res.data.code == 400){
  1047 + if (res.data.errors.email){
  1048 + that.showtoast('邮箱格式有误')
  1049 + }
991 1050 }
992 1051 },
993 1052 fail(res) {
... ... @@ -1079,7 +1138,7 @@ Page({
1079 1138 var gender = this.data.genderData.selected;
1080 1139 var long_birth_date = Date.parse(new Date(this.data.birthDate.selected)) / 1000;
1081 1140 console.log("birth_day", long_birth_date + "---" + this.data.long_birth_date)
1082   - if (this.data.taxInfo.certification_status == 'active'||(this.data.has_certify&&name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) {
  1141 + if ((this.data.has_certify&&name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && long_birth_date == this.data.long_birth_date)) {
1083 1142 return 'active'
1084 1143 } else {
1085 1144 return ''
... ...
... ... @@ -28,18 +28,18 @@
28 28 <text class='red_star_right_10'>*</text>
29 29 <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text>
30 30 <view>
31   - <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active'}}"></image>
32   - <input class='input_wrap float_right' disabled="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum' type='idcard'></input>
33   - <!-- <input class='input_wrap float_right' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>
34   - <input class='input_wrap float_right' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> -->
  31 + <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}"></image>
  32 + <input class='input_wrap' disabled="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum' type='idcard'></input>
  33 + <!-- <input class='input_wrap' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>
  34 + <input class='input_wrap' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> -->
35 35 </view>
36 36 </view>
37 37 <view class='item_body' hidden="{{!isself}}">
38 38 <text class='red_star_right_10'>*</text>
39 39 <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text>
40   - <input class='input_wrap float_right' placeholder="请输入姓名" value='{{name}}' disabled="{{taxInfo.certification_status=='active'}}" bindblur='bindinputname' style='line-height: 90rpx'></input>
41   - <!-- <input hidden="{{taxInfo.certification_status=='active'}}" class='input_wrap float_right' placeholder="请输入姓名" value='{{name}}' bindblur='bindinputname' style='line-height: 90rpx'></input>
42   - <input hidden="{{taxInfo.certification_status!='active'}}" class='input_wrap float_right' placeholder="{{name}}" disabled="true" bindblur='bindinputname' style='line-height: 90rpx'></input> -->
  40 + <input class='input_wrap' placeholder="请输入姓名" value='{{name}}' disabled="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}" bindblur='bindinputname' style='line-height: 90rpx'></input>
  41 + <!-- <input hidden="{{taxInfo.certification_status=='active'}}" class='input_wrap' placeholder="请输入姓名" value='{{name}}' bindblur='bindinputname' style='line-height: 90rpx'></input>
  42 + <input hidden="{{taxInfo.certification_status!='active'}}" class='input_wrap' placeholder="{{name}}" disabled="true" bindblur='bindinputname' style='line-height: 90rpx'></input> -->
43 43 </view>
44 44 <view class="divide_line_30"></view>
45 45
... ... @@ -91,7 +91,7 @@
91 91 <view class='item_body'>
92 92 <text class='red_star_right_10'>*</text>
93 93 <text class='text_777_30 float_left' style='line-height: 90rpx'>手机号码</text>
94   - <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input>
  94 + <input class='input_wrap' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile' type='number'></input>
95 95 </view>
96 96
97 97 <!-- 非必填部分02 -->
... ... @@ -101,20 +101,20 @@
101 101 <view class="divide_line_30"></view>
102 102 <view class='item_body'>
103 103 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>详细地址</text>
104   - <input class='input_wrap float_right ' name='current_address_detail' value="{{taxInfo.current_address_detail}}" placeholder-class='text_999_30' placeholder='请输入详细居住地址'></input>
  104 + <input class='input_wrap ' name='current_address_detail' value="{{taxInfo.current_address_detail}}" placeholder-class='text_999_30' placeholder='请输入详细居住地址'></input>
105 105 </view>
106 106 <view class="divide_line_30"></view>
107 107 <template is="picker_cell_normal" data="{{...birthaddressInfo}}" />
108 108 <view class="divide_line_30"></view>
109 109 <view class='item_body '>
110 110 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>详细地址</text>
111   - <input class='input_wrap float_right ' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址' value='{{huji_address_detail}}'></input>
  111 + <input class='input_wrap ' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址' value='{{huji_address_detail}}'></input>
112 112 </view>
113 113 <view class="divide_line_30"></view>
114 114
115 115 <view class='item_body'>
116 116 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>电子邮箱</text>
117   - <input class='input_wrap float_right' name='email' value='{{taxInfo.email}}' placeholder='请输入电子邮箱' placeholder-class='text_999_30' maxlength='20'></input>
  117 + <input class='input_wrap' name='email' value='{{taxInfo.email}}' placeholder='请输入电子邮箱' placeholder-class='text_999_30' maxlength='32'></input>
118 118 </view>
119 119 </view>
120 120
... ... @@ -148,14 +148,14 @@
148 148 <view class="divide_line_30"></view>
149 149 <view class='item_body'>
150 150 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>银行账号</text>
151   - <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24' type='number'></input>
  151 + <input class='input_wrap' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='19' type='number'></input>
152 152 </view>
153 153 <view class="divide_line_30"></view>
154 154 <template is="picker_cell_normal" data="{{...disabilityInfo}}" />
155 155 <view class="divide_line_30" hidden="{{disabilityInfo.selected!='是'}}"></view>
156 156 <view class='item_body' hidden="{{disabilityInfo.selected!='是'}}">
157 157 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>残疾证号</text>
158   - <input class='input_wrap float_right' name='disability_no' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input>
  158 + <input class='input_wrap' name='disability_no' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input>
159 159 </view>
160 160 <view class="divide_line_30"></view>
161 161
... ... @@ -163,7 +163,7 @@
163 163 <view class="divide_line_30" hidden="{{lieshuInfo.selected!='是'}}"></view>
164 164 <view class='item_body' hidden="{{lieshuInfo.selected!='是'}}">
165 165 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>烈属证号</text>
166   - <input class='input_wrap float_right' name='martyr_family_no' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input>
  166 + <input class='input_wrap' name='martyr_family_no' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input>
167 167 </view>
168 168 <view class="divide_line_30"></view>
169 169
... ... @@ -171,7 +171,7 @@
171 171 <view class="divide_line_30"></view>
172 172 <view class='item_body'>
173 173 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>备注</text>
174   - <input class='input_wrap float_right' value='{{taxInfo.comment}}' name='comment' placeholder-class='text_999_30' placeholder='请输入备注'></input>
  174 + <input class='input_wrap' value='{{taxInfo.comment}}' name='comment' placeholder-class='text_999_30' placeholder='请输入备注'></input>
175 175 </view>
176 176
177 177
... ... @@ -195,7 +195,7 @@
195 195 <view class="divide_line_30"></view>
196 196 <view class='item_body '>
197 197 <text class='text_666_30 float_left' style='line-height: 90rpx'>公司股本总额</text>
198   - <input class='input_wrap float_right ' name='company_equity_total' type='digit' value='{{taxInfo.company_equity_total}}' placeholder-class='text_999_30' placeholder='请输入股本总额(保留两位小数)' maxlength='13' bindblur='companymoney'></input>
  198 + <input class='input_wrap ' name='company_equity_total' type='digit' value='{{taxInfo.company_equity_total}}' placeholder-class='text_999_30' placeholder='请输入股本总额(保留两位小数)' maxlength='13' bindblur='companymoney'></input>
199 199 </view>
200 200 <view class="divide_line_30"></view>
201 201
... ... @@ -208,7 +208,7 @@
208 208 <view class="divide_line_30"></view>
209 209 <view class='item_body '>
210 210 <text class='text_666_30 float_left ' style='line-height: 90rpx'>工号</text>
211   - <input class='input_wrap float_right ' name='employee_no' value='{{taxInfo.employee_no}}' placeholder-class='text_999_30' placeholder='请输入工号' maxlength='20'></input>
  211 + <input class='input_wrap ' name='employee_no' value='{{taxInfo.employee_no}}' placeholder-class='text_999_30' placeholder='请输入工号' maxlength='20'></input>
212 212 </view>
213 213 <view class="divide_line_30"></view>
214 214
... ... @@ -216,7 +216,7 @@
216 216 <view class="divide_line_30"></view>
217 217 <view class='item_body'>
218 218 <text class='text_666_30 float_left ' style='line-height: 90rpx'>个人投资总额</text>
219   - <input class='input_wrap float_right ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}' placeholder-class='text_999_30' placeholder='请输入个人投资总额(保留两位小数)' maxlength='13' bindblur='personalmoney'></input>
  219 + <input class='input_wrap ' name='personal_equity_total' type='digit' value='{{taxInfo.personal_equity_total}}' placeholder-class='text_999_30' placeholder='请输入个人投资总额(保留两位小数)' maxlength='13' bindblur='personalmoney'></input>
220 220 </view>
221 221 <view class="divide_line_30"></view>
222 222 </view>
... ...
... ... @@ -112,6 +112,7 @@ Page({
112 112 text_tip: '去查看'
113 113 })
114 114 }
  115 + app.globalData.hostInfo = data.items[i]
115 116 }
116 117 datalist.push(data.items[i])
117 118 }
... ...
... ... @@ -16,6 +16,11 @@ function formatTime_date(date) {
16 16 var day = dayFormString(date)
17 17 return [year, month, day].map(formatNumber).join('-')
18 18 }
  19 +function formatTime_month(date) {
  20 + var year = yearFormString(date)
  21 + var month = monthFormString(date)
  22 + return [year, month].map(formatNumber).join('-')
  23 +}
19 24
20 25 function formatDate_min(date) {
21 26 var year = yearFormString(date)
... ... @@ -150,9 +155,92 @@ function checkNumber(theObj) {
150 155 return false;
151 156 }
152 157
  158 +function getAge(birthdate) {
  159 + var yearBirth = birthdate.substring(0, 4);
  160 + var monthBirth = birthdate.substring(5, 7);
  161 + var dayBirth = birthdate.substring(8, 10);
  162 + //获取当前年月日并计算年龄
  163 + var myDate = new Date();
  164 + var monthNow = myDate.getMonth() + 1;
  165 + var dayNow = myDate.getDay();
  166 + var age = myDate.getFullYear() - yearBirth;
  167 + if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
  168 + age--;
  169 + }
  170 + return age;
  171 +}
  172 +
  173 +//银行卡号码检测
  174 +function banknoCheck(bankno) {
  175 + var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位(与luhn进行比较)
  176 + var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
  177 + var newArr = new Array();
  178 + for (var i = first15Num.length - 1; i > -1; i--) { //前15或18位倒序存进数组
  179 + newArr.push(first15Num.substr(i, 1));
  180 + }
  181 + var arrJiShu = new Array(); //奇数位*2的积 <9
  182 + var arrJiShu2 = new Array(); //奇数位*2的积 >9
  183 + var arrOuShu = new Array(); //偶数位数组
  184 + for (var j = 0; j < newArr.length; j++) {
  185 + if ((j + 1) % 2 == 1) { //奇数位
  186 + if (parseInt(newArr[j]) * 2 < 9) arrJiShu.push(parseInt(newArr[j]) * 2);
  187 + else arrJiShu2.push(parseInt(newArr[j]) * 2);
  188 + } else //偶数位
  189 + arrOuShu.push(newArr[j]);
  190 + }
  191 +
  192 + var jishu_child1 = new Array(); //奇数位*2 >9 的分割之后的数组个位数
  193 + var jishu_child2 = new Array(); //奇数位*2 >9 的分割之后的数组十位数
  194 + for (var h = 0; h < arrJiShu2.length; h++) {
  195 + jishu_child1.push(parseInt(arrJiShu2[h]) % 10);
  196 + jishu_child2.push(parseInt(arrJiShu2[h]) / 10);
  197 + }
  198 +
  199 + var sumJiShu = 0; //奇数位*2 < 9 的数组之和
  200 + var sumOuShu = 0; //偶数位数组之和
  201 + var sumJiShuChild1 = 0; //奇数位*2 >9 的分割之后的数组个位数之和
  202 + var sumJiShuChild2 = 0; //奇数位*2 >9 的分割之后的数组十位数之和
  203 + var sumTotal = 0;
  204 + for (var m = 0; m < arrJiShu.length; m++) {
  205 + sumJiShu = sumJiShu + parseInt(arrJiShu[m]);
  206 + }
  207 +
  208 + for (var n = 0; n < arrOuShu.length; n++) {
  209 + sumOuShu = sumOuShu + parseInt(arrOuShu[n]);
  210 + }
  211 +
  212 + for (var p = 0; p < jishu_child1.length; p++) {
  213 + sumJiShuChild1 = sumJiShuChild1 + parseInt(jishu_child1[p]);
  214 + sumJiShuChild2 = sumJiShuChild2 + parseInt(jishu_child2[p]);
  215 + }
  216 + //计算总和
  217 + sumTotal = parseInt(sumJiShu) + parseInt(sumOuShu) + parseInt(sumJiShuChild1) + parseInt(sumJiShuChild2);
  218 +
  219 + //计算luhn值
  220 + var k = parseInt(sumTotal) % 10 == 0 ? 10 : parseInt(sumTotal) % 10;
  221 + var luhn = 10 - k;
  222 +
  223 + if (lastNum == luhn) {
  224 + // $("#banknoInfo").html("luhn验证通过");
  225 + return true;
  226 + } else {
  227 + // $("#banknoInfo").html("银行卡号必须符合luhn校验");
  228 + return false;
  229 + }
  230 +}
  231 +
  232 +function checkEmail(email){
  233 + // var regEmail = /^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$/;
  234 +
  235 + // var regEmail = new RegExp("^[-a-z0-9~!$%^&;*_=+}{/'?]+(/.[-a-z0-9~!$ %^&;*_=+}{/'?]+)*@([a-z0-9_][-a-z0-9_]*(/.[-a-z0-9_]+)* /.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}))(:[0-9]{1,5})?$");
  236 + // return regEmail.test(email);
  237 +}
  238 +
  239 +
153 240 module.exports = {
154 241 formatTime: formatTime,
155 242 formatTime_date: formatTime_date,
  243 + formatTime_month: formatTime_month,
156 244 formatDate_min: formatDate_min,
157 245 formatDateString: formatDateString,
158 246 yearFormString: yearFormString,
... ... @@ -162,5 +250,8 @@ module.exports = {
162 250 curDateTime: curDateTime,
163 251 analyzeIDCard: analyzeIDCard,
164 252 checkNumber: checkNumber,
165   - isMobile: isMobile
  253 + isMobile: isMobile,
  254 + getAge: getAge,
  255 + banknoCheck: banknoCheck,
  256 + checkEmail: checkEmail
166 257 }
... ...
注册登录 后发表评论