提交 df1ed25d9751d11daf99d0fae16874762b0c6f56

作者 wangyu
2 个父辈 ffff818d f57a9593

Merge branch 'dev2.0' into dev_wy

1 1 // pages/main/addtionalreduce/addextrainfo/addextrainfo.js
  2 +var format = require('../../../../utils/util.js');
2 3 var OSSInit;
3 4 var app = getApp();
4 5 var baseUrl = app.globalData.baseUrl;
... ... @@ -351,8 +352,70 @@ Page({
351 352 title: title,
352 353 })
353 354 this.initOSS()
  355 + if (options.datas && options.datas.length){
  356 + this.handleTransData(JSON.parse(options.datas))
  357 + }
354 358 },
355 359
  360 + handleTransData: function (data) {
  361 +
  362 + switch (this.data.cur_index + '') {
  363 + case 'children_education':
  364 + var setData = {}
  365 + if (data.id_card_no && data.id_card_no.length) {
  366 + setData.children_id_card_no = data.id_card_no
  367 + }
  368 + if (data.name && data.name.length) {
  369 + setData.children_name = data.name
  370 + }
  371 + if (data.birth_date && data.birth_date>0) {
  372 + var childrenbirthDate = this.data.childrenbirthDate
  373 + childrenbirthDate.selected = format.formatTime_date(data.birth_date)
  374 + childrenbirthDate.datelong = data.birth_date
  375 + setData.childrenbirthDate = childrenbirthDate
  376 + }
  377 + if (data.percent && data.percent.length) {
  378 + setData.percent = data.percent
  379 + }
  380 + if (data.student_no && data.student_no.length) {
  381 + setData.percent = data.children_student_no
  382 + }
  383 + if (data.education_period && data.education_period.length) {
  384 + var childedudegreeData = this.data.childedudegreeData
  385 + childedudegreeData.selected = data.education_period
  386 + setData.childedudegreeData = childedudegreeData
  387 + }
  388 + if (data.education_start && data.education_start.length) {
  389 + var studystartdate = this.data.studystartdate
  390 + studystartdate.selected = format.formatTime_date(data.education_start)
  391 + studystartdate.datelong = data.education_start
  392 + setData.studystartdate = studystartdate
  393 + }
  394 + if (data.education_end && data.education_end.length) {
  395 + var studyenddate = this.data.studyenddate
  396 + studyenddate.selected = format.formatTime_date(data.education_end)
  397 + studyenddate.datelong = data.education_end
  398 + setData.studyenddate = studyenddate
  399 + }
  400 + // if (data.spouse_name && data.spouse_name.length) {
  401 + // }
  402 + // if (data.spouse_id_card_no && data.spouse_id_card_no.length) {
  403 + // }
  404 + // if (this.data.loverbirthDate.selected.length) {
  405 + // }
  406 + // if (this.data.taxperson_relativeData.selected.length) {
  407 + // }
  408 + // if (data.relationship && data.relationship.length) {
  409 + // }
  410 + this.setData(setData)
  411 + break;
  412 + }
  413 +
  414 + },
  415 +
  416 +
  417 +
  418 +
356 419 initOSS: function() {
357 420 var that = this
358 421 var Authorization = getApp().globalData.Authorization;
... ...
... ... @@ -41,14 +41,14 @@
41 41 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
42 42 <text class='text_black_30 float_left'>分配比例</text>
43 43 <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
44   - <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'></input>
  44 + <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 45 </view>
46 46
47 47 <view class='divide_line_f5f5f5'></view>
48 48 <view style='height:90rpx'>
49 49 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
50 50 <text class='text_black_30 float_left'>子女学籍号</text>
51   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女学籍号' name='children_student_no'></input>
  51 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入子女学籍号' name='children_student_no' value='{{children_student_no}}'></input>
52 52 </view>
53 53 <view class='divide_line_f5f5f5'></view>
54 54
... ...
注册登录 后发表评论