index.vue 70.7 KB
Newer Older
潘琦 committed
1 2 3
<template>
  <div class="full-page">
    <div class="container sign-page">
4
      <!-- <div class="head">
潘琦 committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18
        <div class="head-bg"></div>
        <div class="head-block">
          <div class="table">
            <div class="tr">
              <div class="td picture">
                <div class="avatar" :style="{backgroundImage: 'url(' + orgInfo.picture + ')' }"></div>
              </div>
              <div class="td info">
                <div class="title">{{orgInfo.orgname}}</div>
                <div class="des">{{orgInfo.groupname}}</div>
              </div>
            </div>
          </div>
        </div>
19
      </div> -->
潘琦 committed
20 21 22 23 24 25 26 27 28
      <div class="p-title">
        <span class="label">准妈妈/妈妈基本信息</span>
        <span class="link">默认为户主</span>
      </div>
      <div class="form">
        <div class="table">
          <div class="tr">
            <div class="td label">姓名</div>
            <div class="td text-right">
29
              <input type="text" class="form-control" maxlength="15" v-model="BaseForm.name" @blur="BaseValidateName" placeholder="请输入姓名" :disabled="signStatus=='update'"/>
潘琦 committed
30 31 32 33 34 35
              <span v-show="!BaseValidate.nameState" class="small-hint">(只能是中文或英文,长度1~15位)</span>
            </div>
          </div>
          <div class="tr">
            <div class="td label">手机号</div>
            <div class="td text-right">
36
              <input type="text" class="form-control" maxlength="11" placeholder="请输入有效手机号" @blur="BaseValidatePhone" v-model="BaseForm.phone"/>
潘琦 committed
37 38 39 40 41 42
              <span v-show="!BaseValidate.phoneState" class="small-hint">请输入有效手机号</span>
            </div>
          </div>
          <div class="tr">
            <div class="td label">身份证号</div>
            <div class="td text-right">
43
              <input type="text" class="form-control" placeholder="请输入有效身份证" @blur="BaseValidateIdCard" v-model="BaseForm.idCard" :disabled="signStatus=='update'"/>
潘琦 committed
44 45 46 47 48 49
              <span v-show="!BaseValidate.idCardState" class="small-hint">请输入有效身份证</span>
            </div>
          </div>
          <div class="tr">
            <div class="td label">末次月经时间</div>
            <div class="td text-right">
50
              <div class="td-table" @click="openPickerLastMensesTime">
51 52 53 54 55
                <div class="td-table-cell text">
                  <span v-if="BaseForm.lastMensesTime === ''">请选择末次月经时间</span>
                  <span v-else class="light">{{BaseForm.lastMensesTime}}</span>
                  <!-- {{BaseForm.lastMensesTime !== '' ? BaseForm.lastMensesTime : '请选择末次月经时间'}} -->
                </div>
潘琦 committed
56 57 58 59 60 61 62 63 64 65
                <div class="td-table-cell icon">
                  <i class="glyphicon glyphicon-menu-right"></i>
                </div>
              </div>
              <span v-show="!BaseValidate.lastMensesTimeState" class="small-hint">请选择末次月经时间</span>
            </div>
          </div>
          <div class="tr">
            <div class="td label">现住址</div>
            <div class="td text-right">
66
              <div class="td-table" @click="openPopupAddress">
潘琦 committed
67
                <div class="td-table-cell text">
68
                  <p class="m-b-normal">
69
                    <span v-if="BaseForm.address === '' || BaseForm.address === ' '">请选择现在居住地址</span>
70 71 72 73 74 75
                    <span v-else class="light">{{BaseForm.address}}</span>
                    <!-- {{BaseForm.address==''? '请选择现在居住地址':BaseForm.address}} -->
                  </p>
                  <p class="m-b-normal" v-if="BaseForm.subAddress!=''" :class="BaseForm.subAddress!=''?'light':''">
                    {{BaseForm.subAddress}}
                  </p>
潘琦 committed
76 77 78 79 80 81 82 83
                </div>
                <div class="td-table-cell icon">
                  <i class="glyphicon glyphicon-menu-right"></i>
                </div>
              </div>
              <span v-show="!BaseValidate.addressState" class="small-hint">请选择现在居住地址</span>
            </div>
          </div>
84 85 86
          <div class="tr">
            <div class="td label">详细地址</div>
            <div class="td text-right">
87
              <input type="text" v-model="BaseForm.street" class="form-control" placeholder="请输入小区/楼栋/门牌号(最多25字)" maxlength="25" @blur="BaseValidateStreet" />
88 89 90
              <span v-if="!BaseValidate.streetState" class="small-hint">请输入详细地址</span>
            </div>
          </div>
潘琦 committed
91 92
        </div>
      </div>
93
      <!-- <div class="form">
潘琦 committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
        <div class="table">
          <div class="tr">
            <div class="td label">保健手册编码</div>
            <div class="td text-right">
              <div class="td-table">
                <div class="td-table-cell text">
                  <input class="form-control" v-model="BaseForm.code" placeholder="请扫描保健手册条形码"/>
                </div>
                <div class="td-table-cell icon text-orange">
                  <i class="glyphicon glyphicon-barcode"  @click="scanCode()"></i>
                </div>
              </div>
              <span v-show="!BaseValidate.lastMensesTimeState" class="small-hint">请扫描或手动输入保健手册条形码</span>
            </div>
          </div>
        </div>
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
      </div> -->
      <!-- <div class="form">
        <div class="table">
          <div class="tr">
            <div class="td label">社区卫生机构</div>
            <div class="td text-right">
              <div class="td-table" @click="openPopupOrg">
                <div class="td-table-cell text">
                  <p class="m-b-normal">{{BaseForm.orgName==''? '请选择所在社区卫生机构':BaseForm.orgName}}</p>
                </div>
                <div class="td-table-cell icon">
                  <i class="glyphicon glyphicon-menu-right"></i>
                </div>
              </div>
              <span v-show="!BaseValidate.orgState" class="small-hint">请选择所在社区卫生机构</span>
            </div>
          </div>
        </div>
      </div> -->
      <div class="p-title" v-if="pageType===0">
        <span class="label">上传身份证明资料:身份证正面/反面</span>
潘琦 committed
131
      </div>
132 133 134 135
      <div class="upload-list" v-if="pageType===0">
        <ul class="nav-pills">
          <li v-for="(item, index) in BaseForm.chooseImages" :key="index">
            <span>
136
              <img :src="item" @click="handelLightbox(item)" class="full-width"/>
137
            </span>
138
            <i class="close-btn glyphicon glyphicon-remove-circle" @click="removeChooseImgsByIndex('1', index)" v-if="signStatus==='create'"></i>
139
          </li>
140
          <li v-if="ChoosePlusVisible">
141 142 143 144 145 146 147 148 149 150 151 152 153 154
            <span class="upload-plus" @click="handelChooseImage(1)">
              <i class="glyphicon glyphicon-plus"></i>
            </span>
          </li>
        </ul>
      </div>
      <span v-show="!BaseValidate.chooseImg1State" class="text-danger">请选择身份证正反面两张图片</span>
      <div class="p-title" v-if="pageType===0">
        <span class="label" style="white-space: initial;">上传怀孕资料:早孕告知书、最近一次化验单(B照、肝功、肾功、血常规、尿常规、心电图)</span>
      </div>
      <div class="upload-list" v-if="pageType===0">
        <ul class="nav-pills">
          <li v-for="(item, index) in BaseForm.chooseImages2" :key="index">
            <span>
155
              <img :src="item" @click="handelLightbox(item)" class="full-width"/>
156
            </span>
157
            <i class="close-btn glyphicon glyphicon-remove-circle" @click="removeChooseImgsByIndex('2', index)" v-if="signStatus==='create'"></i>
158
          </li>
159
          <li v-if="Choose2PlusVisible">
160 161 162 163 164 165 166
            <span class="upload-plus" @click="handelChooseImage(2)">
              <i class="glyphicon glyphicon-plus"></i>
            </span>
          </li>
        </ul>
      </div>
      <div class="p-title hide">
潘琦 committed
167 168
        <span class="label">服务成员信息</span>
      </div>
169
      <div class="form hide" v-if="pageType===0">
潘琦 committed
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
        <div class="table">
          <div class="tr">
            <div class="td label">成员类型</div>
            <div class="td text-right">
              <input class="form-control" disabled placeholder="孕产妇"/>
            </div>
          </div>
          <div class="tr">
            <div class="td label">姓名</div>
            <div class="td text-right">
              <input class="form-control" v-model="tab1Form.name" disabled/>
            </div>
          </div>
          <div class="tr">
            <div class="td label">身份证</div>
            <div class="td text-right">
              <input class="form-control" v-model="tab1Form.IdCard" disabled/>
            </div>
          </div>
          <div class="tr">
            <div class="td label">年龄</div>
            <div class="td text-right">
              <input class="form-control" v-model="tab1Form.age" disabled/>
            </div>
          </div>
          <div class="tr">
            <div class="td label">性别</div>
            <div class="td text-right">
              <input class="form-control" v-model="tab1Form.sex" disabled/>
            </div>
          </div>
        </div>
      </div>
203 204 205 206 207 208 209 210 211 212 213 214 215 216
      <div class="p-title" v-if="pageType === 1">
        <span class="label">服务成员信息</span>
      </div>
      <div class="form" v-if="pageType===1" v-for="(item, index) in childrenArr" :key="index">
        <div class="table">
          <div class="tr">
            <div class="td label">属性</div>
            <div class="td text-right">
              <input class="form-control" disabled placeholder="儿童"/>
            </div>
          </div>
          <div class="tr">
            <div class="td label">姓名</div>
            <div class="td text-right">
217 218
              <input class="form-control" v-model="item.name" placeholder="请输入子女真实姓名" :disabled="!item.editor"/>
              <span v-if="!childrensValidate[index].nameState" class="small-hint">(只能是中文或英文,长度1~15位)</span>
219 220 221 222 223 224
            </div>
          </div>
          <div class="tr">
            <div class="td label">性别</div>
            <div class="td text-right">
              <mt-radio
225
                v-if="item.editor"
226 227 228
                v-model="item.sex"
                :options="['女孩', '男孩']">
              </mt-radio>
229
              <input class="form-control" v-model="item.sex" v-if="!item.editor" disabled placeholder="请选择子女性别"/>
230 231 232 233 234
            </div>
          </div>
          <div class="tr">
            <div class="td label">出生年月</div>
            <div class="td text-right">
235 236 237 238 239 240 241 242 243 244 245 246 247
              <div class="td-table" @click="openPickerBirth(index)" v-if="item.editor">
                <div class="td-table-cell text">
                  <p class="m-b-normal">
                    <span v-if="item.age === ''">请选择子女出生日期</span>
                    <span v-else class="light">{{item.age}}</span>
                  </p>
                </div>
                <div class="td-table-cell icon">
                  <i class="glyphicon glyphicon-menu-right"></i>
                </div>
              </div>
              <input class="form-control" v-model="item.age" v-if="!item.editor" placeholder="请选择子女出生日期" disabled/>
              <span v-show="!childrensValidate[index].ageState" class="small-hint">请选择子女出生日期</span>
248 249 250 251 252 253 254 255 256 257 258 259 260
            </div>
          </div>
        </div>
      </div>
      <div class="notice">
        <span>
          <mt-checklist
            v-model="noticeCheck"
            :options="noticeOptions">
          </mt-checklist>
          <span class="cell link" @click="noticePopupVisible=true">签约须知</span>
        </span>
      </div>
潘琦 committed
261
      <div class="footer">
262
        <button class="btn-default btn-block" @click="confirmSignature">确认签约</button>
潘琦 committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
      </div>
    </div>
    <mt-popup
      v-model="addressPopupVisible"
      class="full-width addressPopup"
      position="bottom">
      <div class="address-step">
        <ul class="step-list">
          <li>
            <div class="step-item" :class="addressForm.province!=='' && stepCurrent !=1? 'finish':stepCurrent==1?'process':''" @click="handleStep(1)">
              <span class="icon">
                <span class="ico">
                  <span class="glyphicon"><i class="glyphicon glyphicon-ok"></i></span>
                  <span class="number">1</span>
                </span>
                <span class="line"></span>
              </span>
              <span class="text" :class="addressForm.province===''?'text-red':''">
                {{addressForm.province !== '' ? addressForm.province : '请选择省会'}}
              </span>
            </div>
          </li>
          <li>
            <div class="step-item" :class="addressForm.city!=='' && stepCurrent !=2? 'finish':stepCurrent==2?'process':''" @click="handleStep(2)">
              <span class="icon">
                <span class="ico">
                  <span class="glyphicon"><i class="glyphicon glyphicon-ok"></i></span>
                  <span class="number">2</span>
                </span>
                <span class="line"></span>
              </span>
              <span class="text" :class="addressForm.city===''?'text-red':''">
                {{addressForm.city !== '' ? addressForm.city : '请选择城市'}}
              </span>
            </div>
          </li>
          <li>
            <div class="step-item" :class="addressForm.area!=='' && stepCurrent !=3? 'finish':stepCurrent==3?'process':''" @click="handleStep(3)">
              <span class="icon">
                <span class="ico">
                  <span class="glyphicon"><i class="glyphicon glyphicon-ok"></i></span>
                  <span class="number">3</span>
                </span>
                <span class="line"></span>
              </span>
              <span class="text" :class="addressForm.area===''?'text-red':''">
                {{addressForm.area !== '' ? addressForm.area : '请选择区域'}}
              </span>
            </div>
          </li>
          <li>
            <div class="step-item" :class="addressForm.street!=='' && stepCurrent !=4? 'finish':stepCurrent==4?'process':''" @click="handleStep(4)">
              <span class="icon">
                <span class="ico">
                  <span class="glyphicon"><i class="glyphicon glyphicon-ok"></i></span>
                  <span class="number">4</span>
                </span>
                <span class="line"></span>
              </span>
              <span class="text" :class="addressForm.street===''?'text-red':''">
                {{addressForm.street !== '' ? addressForm.street : '请选择街道'}}
              </span>
            </div>
          </li>
          <li>
            <div class="step-item" :class="addressForm.villages!=='' && stepCurrent !=5? 'finish':stepCurrent==5?'process':''" @click="handleStep(5)">
              <span class="icon">
                <span class="ico">
                  <span class="glyphicon"><i class="glyphicon glyphicon-ok"></i></span>
                  <span class="number">5</span>
                </span>
                <span class="line"></span>
              </span>
              <span class="text" :class="addressForm.villages===''?'text-red':''">
                {{addressForm.villages !== '' ? addressForm.villages : '请选择居委会'}}
              </span>
            </div>
          </li>
        </ul>
      </div>
      <div class="address-list">
344 345 346 347 348
        <div class="address-head">
          <div class="search-control">
            <input type="search" @keyup.enter="changesearch" v-model="addressSearchValue" placeholder="搜索"/>
          </div>
        </div>
潘琦 committed
349
        <div class="switch province-list" v-if="stepCurrent===1">
350
          <div class="title">选择省份</div>
潘琦 committed
351
          <ul>
352 353 354
            <template v-for="(item, index) in ProvinceData">
              <li v-if="item.disabled === false" @click="setProvince(item.adminAreaCode, item.adminAreaName)" :key="index">{{item.adminAreaName}}</li>
            </template>
潘琦 committed
355 356 357 358 359
          </ul>
        </div>
        <div class="switch city-list" v-if="stepCurrent===2">
          <div class="title">选择城市</div>
          <ul>
360 361 362
            <template v-for="(item, index) in CityData">
              <li v-if="item.disabled === false" @click="setCity(item.adminAreaCode, item.adminAreaName)" :key="index">{{item.adminAreaName}}</li>
            </template>
潘琦 committed
363 364 365 366 367
          </ul>
        </div>
        <div class="switch area-list" v-if="stepCurrent===3">
          <div class="title">选择区域</div>
          <ul>
368 369 370
            <template v-for="(item, index) in AreaData">
              <li v-if="item.disabled === false" @click="setArea(item.adminAreaCode, item.adminAreaName)" :key="index">{{item.adminAreaName}}</li>
            </template>
潘琦 committed
371 372 373 374 375
          </ul>
        </div>
        <div class="switch street-list" v-if="stepCurrent===4">
          <div class="title">选择街道</div>
          <ul>
376 377 378
            <template v-for="(item, index) in StreetData">
              <li v-if="item.disabled === false" @click="setStreet(item.adminAreaCode, item.adminAreaName)" :key="index">{{item.adminAreaName}}</li>
            </template>
潘琦 committed
379 380 381 382 383
          </ul>
        </div>
        <div class="switch villages-list" v-if="stepCurrent===5">
          <div class="title">选择居委会</div>
          <ul>
384 385 386
            <template v-for="(item, index) in VillagesData">
              <li v-if="item.disabled === false" @click="setVillages(item.adminAreaCode, item.adminAreaName)" :key="index">{{item.adminAreaName}}</li>
            </template>
潘琦 committed
387 388 389 390
          </ul>
        </div>
      </div>
      <div class="footer-btn">
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
        <button class="btn-block" @click="cancelPopupAddress">取消</button>
      </div>
    </mt-popup>
    <mt-popup
      v-model="orgPopupVisible"
      class="full-width addressPopup"
      position="bottom">
      <div class="">
        <div class="address-list">
          <div class="switch area-list">
            <div class="title">选择卫生服务机构</div>
            <ul>
              <li v-for="(item, index) in areaOrgs" @click="setOrgId(item)" :key="index">{{item.orgName}}</li>
            </ul>
          </div>
        </div>
      </div>
      <div class="footer-btn">
        <button class="btn-block" @click="cancelPopupOrg">取消</button>
潘琦 committed
410 411
      </div>
    </mt-popup>
412 413 414 415 416 417 418 419 420 421 422 423 424
    <mt-popup
      v-model="noticePopupVisible"
      class="full-width noticePopup"
      position="bottom">
      <div class="body">
        <img :src="noticePicture" class="full-width"/>
        <div class="footer-btn">
          <button class="btn-block" @click="noticePopupHandelClose">确定</button>
        </div>
      </div>
    </mt-popup>
    <div class="signPopup" :class="SignatureSheetVisible?'on':'off'">
      <div class="body">
425 426 427
        <div class="title">居民签约 <span class="close" @click="closeSignPopup"><i class="glyphicon glyphicon-remove-circle"></i></span></div>
        <div class="canvas" ref="signCanvasBlock" @touchstart.prevent="signChange">
          <vueSignature ref="signature" :sigOption="signOption" :h="signCanvasH" :waterMark="waterMarkOptions"></vueSignature>
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449
        </div>
      </div>
      <div class="footer-btn">
        <button class="overwrite-btn" @click="handelOverwrite">重写</button>
        <button class="confirm-btn" :class="btnDisabled?'disabled':''" :disabled="btnDisabled" @click="handelSubmit">确认</button>
      </div>
    </div>
    <!-- <mt-popup
      v-model="SignatureSheetVisible"
      class="full-width signaturePopup"
      position="bottom">
      <div class="body">
        <div class="title">居民签约 <span class="close" @click="SignatureSheetVisible=false"><i class="glyphicon glyphicon-remove-circle"></i></span></div>
        <div class="canvas">
          <vueSignature ref="signature" :sigOption="signOption" :w="'400px'" :h="'400px'"></vueSignature>
        </div>
      </div>
      <div class="footer-btn">
        <button class="overwrite-btn" @click="handelOverwrite">重写</button>
        <button class="confirm-btn" @click="handelSubmit">确认</button>
      </div>
    </mt-popup> -->
潘琦 committed
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
    <!-- 出生年月picker -->
    <mt-datetime-picker
      v-model="pickerBirthDefault"
      ref="pickerBirth"
      type="date"
      year-format="{value} 年"
      month-format="{value} 月"
      date-format="{value} 日"
      @confirm="pickerBirthConfirm"
      :endDate="pickerBirthEnd">
    </mt-datetime-picker>
    <!-- 末次月经时间picker -->
    <mt-datetime-picker
      v-model="pickerLastMensesTimeDefault"
      ref="pickerLastMensesTime"
      type="date"
      year-format="{value} 年"
      month-format="{value} 月"
      date-format="{value} 日"
      @confirm="lastMensesTimePickerConfirm"
      :startDate="pickerLastMensesTimeStart"
      :endDate="pickerLastMensesTimeEnd">
    </mt-datetime-picker>
473 474 475 476 477 478 479
    <div class="light-box" :class="lightBoxVisible?'show':'hide'" @click="handelLightBoxClose">
      <div class="table">
        <div class="cell">
          <img :src="lightBoxImage"/>
        </div>
      </div>
    </div>
480
    <div class="v-modal" v-show="modalVisible" style="z-index: 98"></div>
潘琦 committed
481 482 483 484
  </div>
</template>

<script>
485
import store from '@/store'
486
import { getOrgInfo, getSignInfo, getAreaList, getVillages, getOrgsByAreaCode, createSign } from '@/api/signing/signing'
潘琦 committed
487 488 489
import { validatename, cardid, isvalidatemobile } from '@/util/validate'
import { SubtractDay, getBirthByIdNumber, getSexByIdCard, getAgeByBirth } from '@/util/index'
import _defaultPicture from '../../assets/images/org-default-picture.png'
490
import _noticePicture from '../../assets/images/notice-img.png'
491
import _signatureBg from '../../assets/images/signature-bg.png'
492
// import { wxpermission } from '@/wxpermission'
493
const wx = require('weixin-js-sdk')
潘琦 committed
494 495 496 497 498

export default {
  name: 'Home',
  data () {
    return {
499
      userId: store.getters.user_id,
潘琦 committed
500 501 502
      pageType: this.$route.query.pageType ? parseInt(this.$route.query.pageType) : null, // 0=孕产妇 1=儿童
      orgId: this.$route.query.orgId ? parseInt(this.$route.query.orgId) : null,
      groupId: this.$route.query.groupId ? parseInt(this.$route.query.groupId) : null,
503
      accountId: this.$route.query.accountId ? this.$route.query.accountId : store.getters.accountId,
504
      slaveId: this.$route.query.slaveId ? this.$route.query.slaveId : null,
505
      from: this.$route.query.voucherFrom ? this.$route.query.voucherFrom : '',
潘琦 committed
506 507 508 509 510 511
      orgInfo: {
        picture: _defaultPicture,
        orgname: '',
        groupname: ''
      },
      signStatus: 'create',
512
      signState: '', // 0=待审核 1=审核通过 2=审核不通过 3=审核已取消
潘琦 committed
513
      alreadySignNum: 0, // 已签约服务人员数
514 515 516 517 518 519 520 521 522 523 524 525
      childrenArr: [
        {
          name: '',
          sex: '男孩',
          age: '',
          birth: '',
          editor: true,
          animate: '',
          state: '',
          signState: ''
        }
      ], // 签约(儿童)服务成员
526 527 528 529 530 531 532 533
      childrensValidate: [
        {
          nameState: true,
          sexState: true,
          birthState: true,
          ageState: true
        }
      ], // 签约(儿童)服务成员,姓名、性别、年龄校验合法性
潘琦 committed
534 535 536 537 538 539 540 541
      addChildrenBtnVisible: true,
      BaseForm: {
        name: '',
        idCard: '',
        phone: '',
        lastMensesTime: '', // 末次月经时间
        address: '',
        subAddress: '',
542 543 544
        street: '',
        code: '',
        orgName: '',
潘琦 committed
545
        chooseImages: [], // 身份证图片
546 547 548
        chooseImagesIds: [], // 身份证图片微信本地图片id
        chooseImages2: [], // 怀孕资料图片
        chooseImages2Ids: [] // 怀孕资料图片微信本地图片id
潘琦 committed
549 550 551 552 553 554
      },
      BaseValidate: { // 表单各个列是否合法状态
        nameState: true,
        idCardState: true,
        phoneState: true,
        lastMensesTimeState: true,
555 556 557 558
        addressState: true,
        streetState: true,
        orgState: true,
        chooseImg1State: true
潘琦 committed
559 560 561 562 563 564 565
      },
      btnDisabled: false,
      pickerLastMensesTimeDefault: new Date(), // 末次月经时间默认选中日期为当天
      pickerLastMensesTimeStart: SubtractDay(290), // 末次月经时间起始日期为当天日期前290天
      pickerLastMensesTimeEnd: new Date(), // 末次月经时间控件结束日期小于当天
      pickerBirthDefault: new Date(), // 出生年月默认选中日期为当天
      pickerBirthEnd: new Date(), // 出生年月控件结束日期小于当天
566
      pickerOpenIndex: 0, // 子女出生年月日期控件下标
潘琦 committed
567
      addressPopupVisible: false, // “现住址”popup显示状态
568
      orgPopupVisible: false, // “所在卫生服务机构”popup显示状态
潘琦 committed
569
      addressForm: {
570 571 572
        province: '',
        city: '',
        area: '',
潘琦 committed
573 574
        street: '',
        villages: '',
575 576 577
        ProvinceCode: '',
        CityCode: '',
        AreaCode: '',
潘琦 committed
578 579 580
        StreetCode: '',
        VillagesCode: ''
      },
581
      stepCurrent: 1, // 地址省市区街道步骤下标
582 583 584 585 586
      ProvinceData: [], // 省会列表数据
      CityData: [], // 城市列表数据
      AreaData: [], // 区域列表数据
      StreetData: [], // 街道列表数据
      VillagesData: [], // 居委会列表数据
潘琦 committed
587 588 589 590 591 592 593
      tab1Form: { // 签约(孕产妇)服务成员信息
        name: '',
        IdCard: '',
        age: '',
        type: '',
        sex: '',
        state: ''
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
      },
      noticePopupVisible: false,
      noticePicture: _noticePicture,
      noticeCheck: [],
      noticeOptions: [
        { label: '我已阅读并确认', value: '1' }
      ],
      areaOrgs: [], // 区域下所有机构
      SignatureSheetVisible: false,
      signatureImage: '',
      signCanvasW: '400px',
      signCanvasH: '220px',
      signOption: {
        penColor: 'rgb(0, 0, 0)',
        backgroundColor: '#efefef'
609
      },
610 611 612 613 614 615 616 617 618 619
      signBGdataUrl: _signatureBg,
      signWaterMarkState: true,
      waterMarkOptions: {
        text: '请在此处签名,字迹工整!', // watermark text, > default ''
        font: '16px Arial', // mark font, > default '20px sans-serif'
        style: 'fill', // fillText and strokeText,  'all'/'stroke'/'fill', > default 'fill
        fillStyle: '#333', // fillcolor, > default '#333'
        x: 100, // fill positionX, > default 20
        y: 100 // fill positionY, > default 20
      },
620 621 622
      lightBoxVisible: false,
      lightBoxImage: '',
      ChoosePlusVisible: true,
623
      Choose2PlusVisible: true,
624 625
      modalVisible: false, // 底层透明遮挡显示状态
      addressSearchValue: ''
潘琦 committed
626 627 628
    }
  },
  created () {
629
    console.log('created')
630
    // wxpermission(0, () => {})
631
    // this.getOrgInfoFn()
632
    // 根据来源,省市区联动相对应显示默认值
633 634 635 636 637
    if (this.from !== '') {
      switch (this.from) {
        case '320582':
          this.addressForm.province = '江苏省'
          this.addressForm.city = '苏州市'
638
          this.addressForm.area = '张家港市'
639 640 641
          this.addressForm.ProvinceCode = '320000'
          this.addressForm.CityCode = '320500'
          this.addressForm.AreaCode = '320582'
642
          this.stepCurrent = 4
643 644 645 646 647 648
          break
        default:
          this.stepCurrent = 1
          break
      }
    }
649
    this.getUserSignInfoFn() // 获取用户签约信息回显
潘琦 committed
650 651
  },
  mounted: function () {
652
    console.log('mounted')
潘琦 committed
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
  },
  computed: {
  },
  components: {
  },
  methods: {
    getOrgInfoFn () { // 获取机构及团队信息
      if (this.orgId === null || this.groupId === null) {
        this.$toast({
          message: '机构或团队标识为空!',
          position: 'center',
          duration: 3000
        })
        return
      }
      let params = {
        orgId: this.orgId,
        groupId: this.groupId
      }
      this.$Indicator.open()
      getOrgInfo(params).then(res => {
        console.log(res)
        if (res && res.records != null) {
          let records = res.records
          this.orgInfo.picture = records.groupImage
          this.orgInfo.orgname = records.orgName
          this.orgInfo.groupname = records.groupName
          this.getUserSignInfoFn() // 获取用户签约信息回显
        } else {
          this.$toast({
            message: res.message,
            position: 'center',
            duration: 3000
          })
          this.$Indicator.close()
        }
      }).catch(error => {
        this.$toast({
          message: error.message,
          position: 'center',
          duration: 3000
        })
        this.$Indicator.close()
      })
    },
    getUserSignInfoFn () { // 获取用户签约信息
      if (this.accountId === null || this.accountId === '') {
        this.$toast({
          message: '用户account id不能为空!',
          position: 'center',
          duration: 3000
        })
        return
      }
      let params = {
        type: this.pageType,
        accountId: this.accountId
      }
711 712 713
      if (this.slaveId) {
        params.userId = this.slaveId
      }
潘琦 committed
714 715
      getSignInfo(params).then(res => {
        this.$Indicator.close()
716 717 718 719 720 721 722 723
        // if (res.code && res.code !== 0) {
        //   this.$toast({
        //     message: res.message,
        //     position: 'center',
        //     duration: 3000
        //   })
        //   return false
        // }
724
        let data = res.data.records
潘琦 committed
725 726 727
        console.log(data)
        if (data.signId && data.signId !== '') {
          this.signStatus = 'update'
728 729
          this.Choose2PlusVisible = false
          this.ChoosePlusVisible = false
潘琦 committed
730 731
        } else {
          this.signStatus = 'create'
732
          this.getSignInfoCookies() // 获取用户签约cookie信息
733
          return false
潘琦 committed
734 735 736 737 738
        }
        this.accountId = data.accountId
        this.fileUuid = data.fileUuid
        this.signId = data.signId
        this.userId = data.userId
739
        this.signState = data.state
潘琦 committed
740 741 742 743 744 745 746 747 748
        this.BaseForm.name = data.name
        this.BaseForm.idCard = data.idCard
        this.BaseForm.phone = data.phoneNumber
        if (data.shenName !== '' && data.shiName !== '' && data.xiaName !== '') {
          this.BaseForm.address = data.shenName + ' ' + data.shiName + ' ' + data.xiaName
        }
        if (data.townName !== '' && data.villageName !== '') {
          this.BaseForm.subAddress = data.townName + ' ' + data.villageName
        }
749 750
        this.BaseForm.lastMensesTime = data.pregnantDate && data.pregnantDate !== '' ? data.pregnantDate.split(' ')[0] : ''
        // this.BaseForm.code = data.healthCode
潘琦 committed
751 752 753 754 755 756 757 758 759 760 761
        this.addressForm.province = data.shenName
        this.addressForm.city = data.shiName
        this.addressForm.area = data.xiaName
        this.addressForm.street = data.townName
        this.addressForm.villages = data.villageName
        this.addressForm.ProvinceCode = data.shenBm
        this.addressForm.CityCode = data.shiBm
        this.addressForm.AreaCode = data.xiaBm
        this.addressForm.StreetCode = data.xngBm
        this.addressForm.VillagesCode = data.villageBm

762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
        if (this.addressForm.ProvinceCode !== '') {
          this.stepCurrent = 1
        }
        if (this.addressForm.CityCode !== '') {
          this.stepCurrent = 2
        }
        if (this.addressForm.AreaCode !== '') {
          this.stepCurrent = 3
        }
        if (this.addressForm.StreetCode !== '') {
          this.stepCurrent = 4
        }
        if (this.addressForm.VillagesCode !== '') {
          this.stepCurrent = 5
        }

潘琦 committed
778 779
        this.BaseForm.street = data.userAdress

780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796
        this.BaseForm.chooseImages.push(data.signSfzz) // 身份证图片回显
        this.BaseForm.chooseImages.push(data.signSfzf)

        // 孕产资料图片回显
        if (data.hyzl1 !== '') {
          this.BaseForm.chooseImages2.push(data.hyzl1)
        }
        if (data.hyzl2 !== '') {
          this.BaseForm.chooseImages2.push(data.hyzl2)
        }
        if (data.hyzl3 !== '') {
          this.BaseForm.chooseImages2.push(data.hyzl3)
        }
        if (data.hyzl4 !== '') {
          this.BaseForm.chooseImages2.push(data.hyzl4)
        }

潘琦 committed
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844
        if (this.pageType === 1) { // 签约(儿童)服务成员回显
          if (data.bs.length > 0) {
            this.alreadySignNum = data.bs.length
            this.childrenArr = []
            this.childrensValidate = []
            for (let i = 0; i < data.bs.length; i++) {
              this.childrenArr.push({
                name: data.bs[i].name,
                sex: data.bs[i].sex === '1' ? '男孩' : '女孩',
                age: data.bs[i].birth !== null ? getAgeByBirth(data.bs[i].birth) : '1',
                editor: false,
                state: data.bs[i].state,
                signState: data.bs[i].signState
              })
              this.childrensValidate.push({
                nameState: true,
                sexState: true,
                ageState: true
              })
            }
            console.log('childrenArr:' + this.childrenArr.length)
          }

          if (data.bs.length >= 3) { // 儿童签约服务成员最多添加三条
            this.addChildrenBtnVisible = false
          }
        } else if (this.pageType === 0) { // 孕产妇
          if (this.signStatus === 'update') { // 将基本信息赋值至服务成员
            this.BaseFormIntoTab1()
          }
          if (data.bs.length > 0) {
            this.tab1Form.state = data.bs[0].state
          }
        }
      }).catch((error) => {
        this.$Indicator.close()
        this.$toast({
          message: error.message,
          position: 'center',
          duration: 3000
        })
      })
    },
    BaseValidateHandle () { // 表单验证
      this.BaseValidateName()
      this.BaseValidateIdCard()
      this.BaseValidateMensesLastDate()
      this.BaseValidatePhone()
845 846 847 848
      this.BaseValidateAddress()
      this.BaseValidateStreet()
      // this.BaseValidateOrg()
      this.BaseValidateChooseImg()
潘琦 committed
849 850 851 852 853 854 855
    },
    BaseValidateName () { // 姓名验证
      if (validatename(this.BaseForm.name)) {
        this.BaseValidate.nameState = true
      } else {
        this.BaseValidate.nameState = false
      }
856 857 858
      if (this.pageType === 0) {
        this.BaseFormIntoTab1()
      }
859
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
860 861 862 863 864 865 866
    },
    BaseValidateIdCard () { // 身份证验证
      if (cardid(this.BaseForm.idCard)[0]) {
        this.BaseValidate.idCardState = false
      } else {
        this.BaseValidate.idCardState = true
      }
867 868 869
      if (this.pageType === 0) {
        this.BaseFormIntoTab1()
      }
870
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894
    },
    // BaseValidateIdCardKid () { // 子女身份证验证
    //   if (cardid(this.userData.idCardKid)[0]) {
    //     this.BaseValidate.idCardKidState = false
    //   } else {
    //     this.BaseValidate.idCardKidState = true
    //   }
    // },
    BaseValidateMensesLastDate () { // 末次月经时间验证
      if (this.BaseForm.lastMensesTime === '') {
        this.BaseValidate.lastMensesTimeState = false
      } else {
        this.BaseValidate.lastMensesTimeState = true
      }
    },
    BaseValidatePhone () { // 手机号验证
      console.log('1')
      if (this.BaseForm.phone === '') {
        this.BaseValidate.phoneState = false
      } else if (isvalidatemobile(this.BaseForm.phone)[0]) {
        this.BaseValidate.phoneState = false
      } else {
        this.BaseValidate.phoneState = true
      }
895 896 897
      if (this.pageType === 0) {
        this.BaseFormIntoTab1()
      }
898
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
899 900 901 902 903 904 905 906
    },
    BaseValidateAddress () { // 现住址验证
      if (this.BaseForm.address === '') {
        this.BaseValidate.addressState = false
      } else {
        this.BaseValidate.addressState = true
      }
    },
907
    BaseValidateStreet () { // 详细地址
908
      if (this.BaseForm.street === '' && this.BaseForm.street.length > 25) {
909 910 911 912 913 914 915
        this.BaseValidate.streetState = false
      } else {
        this.BaseValidate.streetState = true
      }
      if (this.pageType === 0) {
        this.BaseFormIntoTab1()
      }
916
      this.saveSignInfoToCookie() // 储存用户签约录入信息
917 918 919 920 921 922 923 924
    },
    BaseValidateOrg () { // 所在社区服务机构验证
      if (!this.BaseForm.orgId || this.BaseForm.orgId === '') {
        this.BaseValidate.orgState = false
      } else {
        this.BaseValidate.orgState = true
      }
    },
潘琦 committed
925 926 927 928 929 930 931
    BaseValidateBirthKid () { // 出生日期验证
      if (this.BaseForm.birthKid === '') {
        this.BaseValidate.birthKidState = false
      } else {
        this.BaseValidate.birthKidState = true
      }
    },
932 933 934 935 936 937 938
    BaseValidateChooseImg () { // 上传身份证图片验证(最少两张)
      if (this.BaseForm.chooseImages.length < 2) {
        this.BaseValidate.chooseImg1State = false
      } else {
        this.BaseValidate.chooseImg1State = true
      }
    },
939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956
    tab2Validate (index) {
      this.tab2ValidateName(index)
      this.tab2ValidateAge(index)
    },
    tab2ValidateName (index) {
      if (validatename(this.childrenArr[index].name)) {
        this.childrensValidate[index].nameState = true
      } else {
        this.childrensValidate[index].nameState = false
      }
    },
    tab2ValidateAge (index) {
      if (this.childrenArr[index].birth === '') {
        this.childrensValidate[index].ageState = false
      } else {
        this.childrensValidate[index].ageState = true
      }
    },
潘琦 committed
957 958 959 960 961 962
    openPickerLastMensesTime () { // 打开末次月经时间日期控件
      this.$refs.pickerLastMensesTime.open()
    },
    lastMensesTimePickerConfirm (date) {
      const selectedDate = new Date(date)
      let month = selectedDate.getMonth() + 1
963 964
      if (selectedDate.getMonth() + 1 < 10) {
        month = '0' + month
潘琦 committed
965
      }
966 967 968 969 970
      let day = selectedDate.getDate()
      if (day < 10) {
        day = '0' + day
      }
      this.BaseForm.lastMensesTime = selectedDate.getFullYear() + '-' + month + '-' + day
971
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
972
    },
973 974
    openPickerBirth (index) { // 打开出生日期控件
      this.pickerOpenIndex = index
潘琦 committed
975 976 977 978 979 980
      this.$refs.pickerBirth.open()
    },
    pickerBirthConfirm (date) {
      this.BaseValidate.birthKidState = true
      const selectedDate = new Date(date)
      let month = selectedDate.getMonth() + 1
981 982 983 984 985 986
      if (month < 10) {
        month = '0' + month
      }
      let day = selectedDate.getDate()
      if (day < 10) {
        month = '0' + day
潘琦 committed
987
      }
988
      let birth = selectedDate.getFullYear() + '-' + month + '-' + day
989 990
      this.childrenArr[this.pickerOpenIndex].birth = birth
      this.childrenArr[this.pickerOpenIndex].age = getAgeByBirth(birth)
潘琦 committed
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015
    },
    openPopupAddress () { // 现住址picker
      this.addressPopupVisible = true
      console.log(this.stepCurrent)
      if (this.stepCurrent === 1) {
        this.getProvince()
      } else if (this.stepCurrent === 2) {
        this.getCity(this.addressForm.ProvinceCode)
      } else if (this.stepCurrent === 3) {
        this.getArea(this.addressForm.CityCode)
      } else if (this.stepCurrent === 4) {
        this.getStreet(this.addressForm.AreaCode)
      } else if (this.stepCurrent === 5) {
        this.getVillages(this.addressForm.StreetCode)
      }
    },
    cancelPopupAddress () {
      this.addressPopupVisible = false

      if (this.addressForm.province !== '') {
        this.BaseForm.address = this.addressForm.province
      }
      if (this.addressForm.city !== '') {
        this.BaseForm.address = this.BaseForm.address + ' ' + this.addressForm.city
      }
1016
      if (this.addressForm.area !== '') {
潘琦 committed
1017 1018 1019 1020 1021 1022 1023 1024 1025
        this.BaseForm.address = this.BaseForm.address + ' ' + this.addressForm.area
      }
      if (this.addressForm.street !== '') {
        this.BaseForm.subAddress = this.addressForm.street
      }
      if (this.addressForm.villages !== '') {
        this.BaseForm.subAddress = this.BaseForm.subAddress + ' ' + this.addressForm.villages
      }
    },
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049
    openPopupOrg () {
      if (this.addressForm.AreaCode !== '') {
        this.orgPopupVisible = true
        let params = {
          countryId: this.addressForm.AreaCode
        }
        getOrgsByAreaCode(params).then(res => {
          this.areaOrgs = res.date
        })
      } else {
        this.$toast({
          message: '请先选择现住址',
          position: 'center',
          duration: 3000
        })
      }
    },
    cancelPopupOrg () {
      this.orgPopupVisible = false
    },
    noticePopupHandelClose () {
      this.noticePopupVisible = false
      this.noticeCheck.push(1)
    },
潘琦 committed
1050 1051 1052 1053 1054 1055 1056 1057
    BaseFormIntoTab1 () { // 将基本信息赋值至孕产妇服务成员
      if (this.BaseForm.name !== '' && this.BaseValidate.nameState && this.BaseForm.idCard !== '' && this.BaseValidate.idCardState) {
        this.tab1Form.name = this.BaseForm.name
        this.tab1Form.IdCard = this.BaseForm.idCard
        this.tab1Form.age = getAgeByBirth(getBirthByIdNumber(this.BaseForm.idCard))
        this.tab1Form.sex = getSexByIdCard(this.BaseForm.idCard) === '1' ? '男' : '女'
      }
    },
1058
    confirmSignature () {
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083
      if (parseInt(this.pageType) === 0) {
        if (this.signState === '1') { // 审核通过 跳转至首页
          this.$router.push({
            path: '/home'
          })
          return
        } else if (this.signState === '0') { // 未审核通过 关闭页面
          this.$toast({
            message: '审核周期约三天,请您耐心等待!',
            position: 'center',
            duration: 3000
          })
          setTimeout(function () {
            wx.closeWindow()
          }, 2500)
          return
        }
      } else if (parseInt(this.pageType) === 1) {
        console.log(this.childrenArr[0].signState)
        if (this.childrenArr[0].signState === '1') {
          this.$router.push({
            path: '/home'
          })
          return
        }
1084 1085
      }

潘琦 committed
1086
      this.BaseValidateHandle()
1087
      if (this.pageType === 1) { // 子女
1088 1089 1090 1091 1092 1093 1094 1095
        let downState = true
        for (let i = 0; i < this.childrenArr.length; i++) {
          this.tab2Validate(i)
          if (!this.childrensValidate[i].nameState || !this.childrensValidate[i].ageState) {
            downState = false
          }
        }
        if (!downState) {
潘琦 committed
1096 1097
          return false
        }
1098 1099
      } else if (this.pageType === 0) { // 配偶
        if (!this.BaseValidate.nameState || !this.BaseValidate.idCardState || !this.BaseValidate.lastMensesTimeState || !this.BaseValidate.chooseImg1State) {
潘琦 committed
1100 1101 1102
          return false
        }
      }
1103 1104 1105 1106 1107 1108 1109 1110

      if (parseInt(this.noticeCheck[0]) !== 1) {
        this.$toast({
          message: '请预览签约须知后勾选',
          position: 'center',
          duration: 3000
        })
        return false
潘琦 committed
1111
      }
1112 1113 1114
      this.SignatureSheetVisible = true
      this.modalVisible = true
      this.signCanvasW = this.$refs.signCanvasBlock.offsetWidth
1115
    },
1116 1117 1118 1119
    closeSignPopup () {
      this.SignatureSheetVisible = false
      this.modalVisible = false
    },
1120 1121
    handelSubmit () { // 签名无误提交
      this.signatureImage = this.$refs.signature.save()
1122
      if (this.$refs.signature.isEmpty()) {
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149
        this.$toast({
          message: '未获到签名信息,请先签名!',
          position: 'center',
          duration: 3000
        })
        return false
      }
      this.handelSave()
    },
    handelOverwrite () { // 签名重写
      this.$refs.signature.clear()
    },
    handelSave () {
      console.log('submit')
      let childrenArr = []
      if (this.pageType === 0) {
        childrenArr = [
          {
            birth: this.tab1Form.IdCard.substring(6, 10) + '-' + this.tab1Form.IdCard.substring(10, 12) + '-' + this.tab1Form.IdCard.substring(12, 14),
            idCard: this.tab1Form.IdCard,
            name: this.tab1Form.name,
            relation: '30', // 20:子女;30:本人(为孕妇)
            sex: this.tab1Form.sex === '男' ? '1' : this.tab1Form.sex === '女' ? '2' : '3',
            state: this.tab1Form.state
          }
        ]
      } else if (this.pageType === 1) {
1150
        for (let i = 0; i < this.childrenArr.length; i++) { // 儿童签约只获取新增服务人员信息
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169
          childrenArr.push({
            birth: this.childrenArr[i].birth,
            idCard: '',
            name: this.childrenArr[i].name,
            relation: '20', // 20:子女;30:本人(为孕妇)
            sex: this.childrenArr[i].sex === '男孩' ? '1' : this.childrenArr[i].sex === '女孩' ? '2' : '3'
          })
        }
      }
      let params = {
        bs: childrenArr,
        // 'accountId': this.accountId,
        // 'group_id': this.groupId,
        'orgId': this.orgId,
        'idCard': this.BaseForm.idCard,
        'pregnantDate': this.BaseForm.lastMensesTime,
        'imagedate': this.signatureImage,
        'name': this.BaseForm.name,
        'phoneNumber': this.BaseForm.phone,
1170
        'type': this.pageType === 0 ? 0 : this.pageType,
1171 1172 1173 1174
        // 'healthCode': this.BaseForm.code,
        'userAdress': this.BaseForm.street,
        'shenBm': this.addressForm.ProvinceCode,
        'shiBm': this.addressForm.CityCode,
1175
        'xiaBm': this.addressForm.AreaCode,
1176 1177 1178 1179 1180 1181 1182 1183
        'xngBm': this.addressForm.StreetCode,
        'villageBm': this.addressForm.VillagesCode,
        'voucherUserId': this.userId,
        'hyzl1': this.BaseForm.chooseImages2[0] ? this.BaseForm.chooseImages2[0] : '',
        'hyzl2': this.BaseForm.chooseImages2[1] ? this.BaseForm.chooseImages2[1] : '',
        'hyzl3': this.BaseForm.chooseImages2[2] ? this.BaseForm.chooseImages2[2] : '',
        'hyzl4': this.BaseForm.chooseImages2[3] ? this.BaseForm.chooseImages2[3] : '',
        'signSfzz': this.BaseForm.chooseImages[0] ? this.BaseForm.chooseImages[0] : '',
1184 1185
        'signSfzf': this.BaseForm.chooseImages[1] ? this.BaseForm.chooseImages[1] : '',
        'dq': 'zjg'
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
      }
      params.accountId = this.accountId
      if (this.signStatus === 'update') { // 如signId不为0或者为空则是修改签约信息
        params.fileUuid = this.fileUuid
        params.signId = this.signId
        params.userId = this.userId
      }
      this.btnDisabled = true
      this.$Indicator.open()
      // console.log('sign params:' + JSON.stringify(params))
      createSign(params).then(res => {
        this.btnDisabled = false
        this.$Indicator.close()
        if (res.code === 200 && res.value) {
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
          if (this.pageType === 0) {
            this.$toast({
              message: '审核周期约三天,请您耐心等待!',
              position: 'center',
              duration: 3000
            })
            if (this.signState === '2' || this.signState === '') { // 签约驳回、第一次签约
              setTimeout(function () {
                wx.closeWindow()
              }, 2500)
            }
          } else if (this.pageType === 1) {
            this.$toast({
              message: '签约成功!',
              position: 'center',
              duration: 3000
            })
            this.$router.push({
              path: '/home'
            })
1220
          }
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
        } else {
          this.$toast({
            message: '保存失败',
            position: 'center',
            duration: 3000
          })
        }
      }).catch((error) => {
        this.btnDisabled = false
        this.$Indicator.close()
        this.$toast({
          message: error.message,
          position: 'center',
          duration: 3000
        })
      })
潘琦 committed
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250
    },
    handleStep (index) {
      console.log('handleStep' + index)
      if (index === 1 && this.addressForm.province !== '') {
        this.stepCurrent = index
        this.getProvince()
      } else if (index === 2 && this.addressForm.city !== '') {
        this.stepCurrent = index
        this.getCity(this.addressForm.ProvinceCode)
      } else if (index === 3 && this.addressForm.region !== '') {
        this.stepCurrent = index
        this.getArea(this.addressForm.CityCode)
      } else if (index === 4 && this.addressForm.street !== '') {
        this.stepCurrent = index
1251
        this.getStreet(this.addressForm.AreaCode)
潘琦 committed
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264
      } else if (index === 5 && this.addressForm.villages !== '') {
        this.stepCurrent = index
        this.getVillages(this.addressForm.StreetCode)
      }
    },
    getProvince () { // 获取省会信息
      let params = {
        parentCode: 0,
        level: 0
      }
      this.getAreaListFn(params)
    },
    setProvince (code, val) {
1265
      this.addressSearchValue = ''
潘琦 committed
1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277
      this.getCity(code)
      this.addressForm.province = val
      this.addressForm.ProvinceCode = code
      this.addressForm.city = ''
      this.addressForm.area = ''
      this.addressForm.street = ''
      this.addressForm.villages = ''
      this.addressForm.CityCode = ''
      this.addressForm.AreaCode = ''
      this.addressForm.StreetCode = ''
      this.addressForm.VillagesCode = ''
      this.stepCurrent = 2
1278
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
1279 1280 1281 1282 1283 1284 1285 1286 1287
    },
    getCity (parentCode) { // 根据省会code获取城市信息
      let params = {
        parentCode: parentCode,
        level: 1
      }
      this.getAreaListFn(params)
    },
    setCity (code, val) {
1288
      this.addressSearchValue = ''
潘琦 committed
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298
      this.getArea(code)
      this.addressForm.city = val
      this.addressForm.CityCode = code
      this.addressForm.area = ''
      this.addressForm.AreaCode = ''
      this.addressForm.street = ''
      this.addressForm.StreetCode = ''
      this.addressForm.villages = ''
      this.addressForm.VillagesCode = ''
      this.stepCurrent = 3
1299
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
1300 1301 1302 1303 1304 1305 1306 1307 1308
    },
    getArea (parentCode) { // 根据城市code获取区域信息
      let params = {
        parentCode: parentCode,
        level: 2
      }
      this.getAreaListFn(params)
    },
    setArea (code, val) {
1309
      this.addressSearchValue = ''
潘琦 committed
1310 1311 1312 1313 1314 1315 1316 1317
      this.getStreet(code)
      this.addressForm.area = val
      this.addressForm.AreaCode = code
      this.addressForm.street = ''
      this.addressForm.StreetCode = ''
      this.addressForm.villages = ''
      this.addressForm.VillagesCode = ''
      this.stepCurrent = 4
1318
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
1319 1320 1321 1322 1323 1324 1325 1326 1327
    },
    getStreet (parentCode) { // 根据区域code获取街道信息
      let params = {
        parentCode: parentCode,
        level: 3
      }
      this.getAreaListFn(params)
    },
    setStreet (code, val) {
1328
      this.addressSearchValue = ''
潘琦 committed
1329 1330 1331 1332 1333 1334
      this.getVillages(code)
      this.addressForm.street = val
      this.addressForm.StreetCode = code
      this.addressForm.villages = ''
      this.addressForm.VillagesCode = ''
      this.stepCurrent = 5
1335
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
1336 1337 1338 1339 1340 1341 1342 1343 1344
    },
    getVillages (parentCode) { // 根据街道code获取居委会信息
      let params = {
        parentCode: parentCode,
        level: 4
      }
      this.getVillagesFn(params)
    },
    setVillages (code, val) {
1345
      this.addressSearchValue = ''
潘琦 committed
1346 1347 1348
      this.addressForm.villages = val
      this.addressForm.VillagesCode = code
      // this.stepCurrent = 5
1349
      this.saveSignInfoToCookie() // 储存用户签约录入信息
潘琦 committed
1350 1351
      this.cancelPopupAddress()
    },
1352 1353 1354 1355 1356
    setOrgId (item) {
      this.BaseForm.orgId = item.orgId
      this.BaseForm.orgName = item.orgName
      this.cancelPopupOrg()
    },
潘琦 committed
1357 1358
    getAreaListFn (params) { // 获取全国省市区街
      getAreaList(params).then(res => {
1359
        let records = res.data.records
潘琦 committed
1360
        if (params.level === 0) {
1361 1362 1363 1364 1365
          this.ProvinceData = []
          records.forEach(item => {
            item.disabled = false
            this.ProvinceData.push(item)
          })
潘琦 committed
1366
        } else if (params.level === 1) {
1367 1368 1369 1370 1371
          this.CityData = []
          records.forEach(item => {
            item.disabled = false
            this.CityData.push(item)
          })
潘琦 committed
1372
        } else if (params.level === 2) {
1373 1374 1375 1376 1377
          this.AreaData = []
          records.forEach(item => {
            item.disabled = false
            this.AreaData.push(item)
          })
潘琦 committed
1378
        } else if (params.level === 3) {
1379 1380 1381 1382 1383
          this.StreetData = []
          records.forEach(item => {
            item.disabled = false
            this.StreetData.push(item)
          })
潘琦 committed
1384 1385 1386 1387 1388
        }
      })
    },
    getVillagesFn (params) { // 获取街道下居委会信息
      getVillages(params).then(res => {
1389 1390 1391 1392 1393 1394
        let records = res.data.records
        this.VillagesData = []
        records.forEach(item => {
          item.disabled = false
          this.VillagesData.push(item)
        })
潘琦 committed
1395
      })
1396 1397 1398 1399
    },
    handelChooseImage (type) {
      let that = this
      if ((that.BaseForm.chooseImages.length < 2 && type === 1) || (that.BaseForm.chooseImages2.length < 4 && type === 2)) {
1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413
        let chooseImgCount = 0
        if (type === 1) { // 身份证明必传2张
          chooseImgCount = 2 - that.BaseForm.chooseImages.length
        } else if (type === 2) { // 产检证明最多传4张
          chooseImgCount = 4 - that.BaseForm.chooseImages2.length
        }

        wx.chooseImage({
          count: chooseImgCount, // 默认9
          sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
          sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
          success: function (res) {
            let localIds = res.localIds // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
            console.log(localIds, type)
1414
            if (type === 1) {
1415
              that.BaseForm.chooseImagesIds.push(localIds)
1416
            } else if (type === 2) {
1417
              that.BaseForm.chooseImages2Ids.push(localIds)
1418 1419
            }
            that.saveSignInfoToCookie() // 储存用户签约录入信息
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483
            that.wxGetLocalImgData(localIds, type)
          }
        })
      }
    },
    wxGetLocalImgData (localIds, type) {
      let that = this
      wx.getLocalImgData({
        localId: localIds.shift(), // 需要上传的图片的本地ID,由chooseImage接口获得
        success: function (res) {
          let localData = res.localData
          let imageBase64 = ''
          // 自处目的是为了解决android图片前没有“data:image/jpeg;base64,”图片无法显示问题
          if (localData.indexOf('data:image') === 0) {
            imageBase64 = localData
          } else {
            imageBase64 = 'data:image/jpeg;base64,' + localData.replace(/\n/g, '')
          }
          if (type === 1) {
            that.BaseForm.chooseImages.push(imageBase64)
          } else if (type === 2) {
            that.BaseForm.chooseImages2.push(imageBase64)
          }
          if (localIds.length > 0) {
            that.wxGetLocalImgData(localIds, type)
          }
          that.uploadImgBtnHandel()
        }
      })
    },
    // async iosPreview (localIds) {
    //   for (let i = 0; i < localIds.length; i++) {
    //     await this.readImage(localIds[i])
    //   }
    // },
    // readImage (item) {
    //   let _this = this
    //   return new Promise((resolve, reject) => {
    //     wx.getLocalImgData({
    //       localId: item,
    //       success: function (res) {
    //         let localData = res.localData
    //         localData = localData.replace('jgp', 'jpeg')
    //         _this.BaseForm.chooseImages.push(localData)
    //         resolve('done!')
    //       },
    //       fail: function () {
    //       }
    //     })
    //   })
    // },
    uploadImgBtnHandel () {
      let that = this
      console.log('===1' + that.BaseForm.chooseImages.length)
      if (that.BaseForm.chooseImages.length >= 2) {
        that.ChoosePlusVisible = false
      } else {
        that.ChoosePlusVisible = true
      }
      console.log('===2' + that.BaseForm.chooseImages2.length)
      if (that.BaseForm.chooseImages2.length >= 4) {
        that.Choose2PlusVisible = false
      } else {
        that.Choose2PlusVisible = true
1484 1485
      }
    },
1486 1487 1488
    removeChooseImgsByIndex (type, index) {
      if (type === '1') { // 身份证照片移除
        this.BaseForm.chooseImages.splice(index, 1)
1489
        this.BaseForm.chooseImagesIds.splice(index, 1)
1490 1491
      } else if (type === '2') { // 产检资料照片移除
        this.BaseForm.chooseImages2.splice(index, 1)
1492
        this.BaseForm.chooseImages2Ids.splice(index, 1)
1493
      }
1494
      this.saveSignInfoToCookie()
1495 1496 1497 1498 1499 1500 1501 1502 1503
      this.uploadImgBtnHandel() // 上传图片按钮根据数量限制显示/隐藏
    },
    handelLightbox (image) { // 图片放大弹层预览
      this.lightBoxImage = image
      this.lightBoxVisible = true
    },
    handelLightBoxClose () {
      this.lightBoxImage = ''
      this.lightBoxVisible = false
1504
    },
1505
    saveSignInfoToCookie () { // 将签约信息存入cookie
1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523
      // if (this.signId === '' || !this.signId) {
      //   let signInfoJSON = {
      //     BaseForm: {
      //       name: this.BaseForm.name,
      //       idCard: this.BaseForm.idCard,
      //       phone: this.BaseForm.phone,
      //       lastMensesTime: this.BaseForm.lastMensesTime, // 末次月经时间
      //       address: this.BaseForm.address,
      //       subAddress: this.BaseForm.subAddress,
      //       street: this.BaseForm.street,
      //       chooseImagesIds: this.BaseForm.chooseImagesIds, // 身份证图片微信本地图片id
      //       chooseImages2Ids: this.BaseForm.chooseImages2Ids // 怀孕资料图片微信本地图片id
      //     },
      //     addressForm: this.addressForm
      //   }
      //   this.$cookies.set('signInfo', JSON.stringify(signInfoJSON), 60 * 60 * 24 * 1)
      //   // store.dispatch('setSignInfo', JSON.stringify(signInfoJSON))
      // }
1524 1525
    },
    getSignInfoCookies () { // 获取用户签约信息cookie
1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565
      // let signInfo = this.$cookies.get('signInfo')
      // if (signInfo !== '' && signInfo) {
      //   this.BaseForm.name = signInfo.BaseForm.name
      //   this.BaseForm.idCard = signInfo.BaseForm.idCard
      //   this.BaseForm.phone = signInfo.BaseForm.phone
      //   this.BaseForm.lastMensesTime = signInfo.BaseForm.lastMensesTime // 末次月经时间
      //   // this.BaseForm.address = signInfo.addressForm.province + ' ' + signInfo.addressForm.city + ' ' + signInfo.addressForm.area
      //   // this.BaseForm.subAddress = signInfo.addressForm.street + ' ' + signInfo.addressForm.villages
      //   console.log(this.addressForm.province)
      //   if (signInfo.addressForm.province !== '') {
      //     this.BaseForm.address = signInfo.addressForm.province
      //   }
      //   if (signInfo.addressForm.city !== '') {
      //     this.BaseForm.address = this.BaseForm.address + ' ' + signInfo.addressForm.city
      //   }
      //   if (signInfo.addressForm.area !== '') {
      //     this.BaseForm.address = this.BaseForm.address + ' ' + signInfo.addressForm.area
      //   }
      //   if (signInfo.addressForm.street !== '') {
      //     this.BaseForm.subAddress = signInfo.addressForm.street
      //   }
      //   if (signInfo.addressForm.villages !== '') {
      //     this.BaseForm.subAddress = this.BaseForm.subAddress + ' ' + signInfo.addressForm.villages
      //   }
      //   this.BaseForm.street = signInfo.BaseForm.street
      //   this.BaseForm.chooseImagesIds = signInfo.BaseForm.chooseImagesIds // 身份证图片微信本地图片id
      //   this.BaseForm.chooseImages2Ids = signInfo.BaseForm.chooseImages2Ids // 怀孕资料图片微信本地图片id
      //   if (this.BaseForm.chooseImagesIds.length > 0) {
      //     this.getWXLocalImgDataById(0, 1)
      //   }
      //   // this.wxGetLocalImgData(signInfo.BaseForm.chooseImages2Ids, 2)
      //   if (!this.from || this.from === '') {
      //     this.addressForm = signInfo.addressForm
      //   }
      //   // this.$toast({
      //   //   message: signInfo.BaseForm.chooseImagesIds,
      //   //   position: 'center',
      //   //   duration: 3000
      //   // })
      // }
1566 1567
    },
    getWXLocalImgDataById (index, type) {
1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604
      let that = this
      let localId = ''
      if (type === 1) {
        localId = that.BaseForm.chooseImagesIds[index]
      } else if (type === 2) {
        localId = that.BaseForm.chooseImages2Ids[index]
      }
      wx.getLocalImgData({
        localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得
        success: function (res) {
          let localData = res.localData
          let imageBase64 = ''
          // 自处目的是为了解决android图片前没有“data:image/jpeg;base64,”图片无法显示问题
          if (localData.indexOf('data:image') === 0) {
            imageBase64 = localData
          } else {
            imageBase64 = 'data:image/jpeg;base64,' + localData.replace(/\n/g, '')
          }
          if (type === 1) {
            that.BaseForm.chooseImages.push(imageBase64)
            if (index + 1 < that.BaseForm.chooseImagesIds.length) {
              that.getWXLocalImgDataById(index + 1, 1)
            } else {
              index = 0
              if (that.BaseForm.chooseImages2Ids.length > 0) {
                that.getWXLocalImgDataById(index, 2)
              }
            }
          } else if (type === 2) {
            that.BaseForm.chooseImages2.push(imageBase64)
            if (index + 1 < that.BaseForm.chooseImages2Ids.length) {
              that.getWXLocalImgDataById(index + 1, 2)
            }
          }
          that.uploadImgBtnHandel()
        }
      })
1605 1606 1607 1608 1609 1610 1611
    },
    signChange (e) { // 第一次签名清除水印
      if (this.signWaterMarkState) {
        console.log('signChange')
        this.handelOverwrite()
        this.signWaterMarkState = false
      }
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693
    },
    changesearch () {
      let searchVal = this.addressSearchValue
      switch (this.stepCurrent) {
        case 1:
          if (searchVal !== '') {
            this.ProvinceData.forEach(item => {
              if (item.adminAreaName.indexOf(searchVal) >= 0) {
                item['disabled'] = false
              } else {
                item['disabled'] = true
              }
            })
          } else {
            this.ProvinceData.forEach(item => {
              item['disabled'] = false
            })
          }
          break
        case 2:
          if (searchVal !== '') {
            this.CityData.forEach(item => {
              if (item.adminAreaName.indexOf(searchVal) >= 0) {
                item['disabled'] = false
              } else {
                item['disabled'] = true
              }
            })
          } else {
            this.CityData.forEach(item => {
              item['disabled'] = false
            })
          }
          break
        case 3:
          if (searchVal !== '') {
            this.AreaData.forEach(item => {
              if (item.adminAreaName.indexOf(searchVal) >= 0) {
                item['disabled'] = false
              } else {
                item['disabled'] = true
              }
            })
          } else {
            this.AreaData.forEach(item => {
              item['disabled'] = false
            })
          }
          break
        case 4:
          if (searchVal !== '') {
            // let newStreetData = []
            this.StreetData.forEach(item => {
              if (item.adminAreaName.indexOf(searchVal) >= 0) {
                item['disabled'] = false
              } else {
                item['disabled'] = true
              }
            })
            console.log(JSON.stringify(this.StreetData))
          } else {
            this.StreetData.forEach(item => {
              item['disabled'] = false
            })
          }
          break
        case 5:
          if (searchVal !== '') {
            this.VillagesData.forEach(item => {
              if (item.adminAreaName.indexOf(searchVal) >= 0) {
                item['disabled'] = false
              } else {
                item['disabled'] = true
              }
            })
          } else {
            this.VillagesData.forEach(item => {
              item['disabled'] = false
            })
          }
          break
      }
潘琦 committed
1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806
    }
  }
}
</script>
<style scoped>
  .full-page {
    background-color: #f5f6f7;
  }
  .sign-page .head{
    position:relative;
    height: 10em;
  }
  .sign-page .head > .head-bg {
    position:absolute;
    background-color:#43d1be;
    width:120%;
    height: 7em;
    left:-10%;
    top:0;
    z-index:1;
    border-bottom-left-radius:50%;
    border-bottom-right-radius:50%;
  }
  .sign-page .head > .head-block {
    position:absolute;
    left:0;
    top: 3em;
    z-index:2;
    background-color:#fff;
    width:100%;
    color:#333;
    box-shadow:0 2px 8px #ccc;
    border-radius: 5px;
    padding: 0 0.5em;
  }
  .sign-page .head > .head-block > .table {
    margin-bottom: 0;
  }

  .sign-page .head > .head-block .td.picture {
    width: 6em;
  }

  .sign-page .head > .head-block .td.picture > .avatar{
    width: 5em;
    height: 5em;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center center;
  }

  .sign-page .head > .head-block .info > .title{
    font-size: 1.1em;
    color:#35444f;
    margin-bottom: 0.5em;
  }

  .sign-page .head > .head-block .info > .des{
    font-size:80%;
  }

  .sign-page .p-title{
    padding: 1.2em 0 0 0;
  }

  .sign-page .form > .table > .tr > .td.label {
    color: #9aa0a4;
    font-weight: normal;
  }
  .addressPopup .address-step{
    padding: 0 1em;
  }

  .address-step .step-list{
    margin-bottom: 0;
    margin-top: 1em;
  }

  .address-step .step-list .step-item > .icon {
    display: inline-block;
    width: 2em;
    height: 2.7em;
    position: relative;
  }
  .address-step .step-list .step-item > .icon > .ico{
    display: inline-block;
    width: 2em;
    height: 2em;
    text-align: center;
    line-height: 2em;
    border: 1px solid #dddee1;
    color: #333;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    background-color: #fff;
    font-size: 0.9em;
  }
  .address-step .step-list .step-item > .icon > .ico > .glyphicon {
    display: none;
    line-height: initial;
  }
  .address-step .step-list .step-item > .icon > .ico > .number{
    display: block;
  }
  .address-step .step-list .step-item.finish > .icon > .ico{
    border:#2d8cf0 solid 1px;
    color:#2d8cf0;
  }
  .address-step .step-list .step-item.finish > .icon > .ico > .glyphicon{
    display: block;
  }
1807 1808 1809
  .address-step .step-list .step-item.finish > .icon > .ico > .glyphicon > i {
    top: 2px;
  }
潘琦 committed
1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844
  .address-step .step-list .step-item.finish > .icon > .ico > .number{
    display: none;
  }
  .address-step .step-list .step-item.process > .icon > .ico{
    border:#2d8cf0 solid 1px;
    background-color: #2d8cf0;
    color:#ffffff;
  }
  .address-step .step-list .step-item > .icon > .line {
    position:absolute;
    height:100%;
    top:0;
    left:0;
    right: 0;
    margin:0 auto;
    width:1px;
    background:#dddee1;
  }
  .address-step .step-list .step-item.finish > .icon > .line{
    background:#2d8cf0;
  }
  .address-step .step-list > li:last-child .step-item > .icon > .line{
    display: none;
  }
  .address-step .step-list .step-item > .text{
    margin-left: 0.5em;
  }

  .addressPopup .address-list {
    padding: 0.5em 1em;
    background-color:#f5f6f7;
    height: 17em;
    overflow-y:auto;
  }

1845 1846 1847 1848
  .addressPopup .address-list .address-head {
    margin: 0.2em 0;
  }

潘琦 committed
1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863
  .addressPopup .address-list > .switch > .title {
    color: #9aa0a4;
  }

  .addressPopup .address-list > .switch > ul li {
    padding: 0.5em 0;
  }

  .addressPopup .footer-btn > button{
    width: 100%;
    padding: 1em 0;
    border: none;
    background-color: #fff;
    font-size: 1em;
  }
1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918

  .noticePopup .body {
    padding: 1em;
    overflow: auto;
    height: 100%;
    position: relative;
    padding-bottom: 60px;
  }
  .noticePopup .footer-btn {
    position: fixed;
    width: 100%;
    left: 0;
    bottom: 0;
  }
  .noticePopup .footer-btn > button {
    width: 100%;
    padding: 1em 0;
    border: none;
    background-color:#43d1be;
    color: #fff;
    font-size: 1em;
  }

  .signaturePopup .body .title{
    padding: 0.7em 0.5em;
    font-size: 1.2em;
    border-bottom: 1px solid #efefef;
  }

  .signaturePopup .body .title > .close {
    opacity: 1;
  }

  .signaturePopup .body .canvas {
    min-height: 240px;
    background-color: #dddee1;
  }
  .signaturePopup .footer-btn {
    overflow: hidden;
  }
  .signaturePopup .footer-btn > button {
    width: 50%;
    padding: 1em 0;
    border: none;
    background-color:#fff;
    font-size: 1em;
    float: left;
  }
  .signaturePopup .footer-btn > button.confirm-btn {
    background-color:#43d1be;
    color: #fff;
  }

  .upload-list{
    overflow: hidden;
1919
    padding-top: 1.2em;
1920 1921 1922 1923
  }
  .upload-list ul li {
    padding-right: 5px;
    margin-left: 0;
1924 1925
    margin-bottom: 5px;
    position: relative;
1926 1927 1928 1929 1930
  }
  .upload-list ul li > span{
    display: inline-block;
    width: 90px;
    height: 90px;
1931
    max-height: 90px;
1932
    position: relative;
1933
    overflow: hidden;
1934 1935 1936 1937 1938 1939 1940 1941 1942
  }
  .upload-list ul li > span.upload-plus {
    font-size: 3em;
    line-height: 90px;
    text-align: center;
    color: #9aa0a4;
    border: 1px dotted #9aa0a4;
    border-radius: 5px;
  }
1943
  .upload-list ul li > .close-btn {
1944 1945
    position: absolute;
    right: 0;
1946
    top: -5px;
1947
    z-index: 1;
1948
    color: #333;
1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969
    font-size: 1.2em;
  }
  .notice{
    margin: 1.1em 0;
    text-align: center;
  }
  .notice .link {
    color: #43d1be;
  }
  .notice > span {
    display: inline-block;
  }
  .notice .mint-checkbox-core::after {
    width: 5px;
  }

  .signPopup {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
1970
    z-index: 99;
1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994
  }
  .signPopup.on {
    top: initial;
    bottom: 0;
  }
  .signPopup.off {
    top: 100%;
    bottom: initial;
  }
  .signPopup .body{
    background-color: #fff;
  }
  .signPopup .body .title{
    padding: 0.7em 0.5em;
    font-size: 1.2em;
    border-bottom: 1px solid #efefef;
  }

  .signPopup .body .title > .close {
    opacity: 1;
  }

  .signPopup .body .canvas {
    min-height: 150px;
1995
    padding: 0 1em;
1996 1997 1998 1999
    /* background-color: #dddee1; */
  }
  .signPopup .footer-btn {
    overflow: hidden;
2000
    border-top: 1px solid #efefef;
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013
  }
  .signPopup .footer-btn > button {
    width: 50%;
    padding: 1em 0;
    border: none;
    background-color:#fff;
    font-size: 1em;
    float: left;
  }
  .signPopup .footer-btn > button.confirm-btn {
    background-color:#43d1be;
    color: #fff;
  }
2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035
  .light-box {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
  }
  .light-box > .table {
    width: 100%;
    height: 100%;
    display: table;
  }
  .light-box > .table > .cell {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
  }
  .light-box > .table > .cell > img {
    max-width: 80%;
  }
2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071
  .footer {
    margin: 10px 0;
  }
</style>

<style>
  .noticePopup.mint-popup-bottom{
    top: 0 ;
  }
  .notice .mint-checklist {
    display: inline-block;
    float: left;
  }
  .notice .mint-checklist > .mint-checklist-title {
    display: none;
  }
  .notice .mint-checklist > .mint-cell {
    min-height: 0;
    background-image: none;
    background-color: transparent;
  }
  .notice .mint-checklist > .mint-cell .mint-cell-wrapper{
    font-size: 1em;
    background-image: none;
    padding: 0;
  }
  .notice .mint-checklist > .mint-cell .mint-cell-wrapper .mint-checklist-label{
    padding: 0;
  }
  .notice .mint-checklist .mint-checkbox-core::after {
    width: 5px;
  }
  .notice .mint-checkbox-input:checked + .mint-checkbox-core {
    background-color: #43d1be;
    border-color: #43d1be;
  }
2072 2073 2074 2075
  .sign-page .form .table .tr .td .mint-radiolist{
    width: 200px;
    float: right;
  }
潘琦 committed
2076
</style>