<template>
    <view>
        <view :class="(showDialog ? 'ohide' : '') + ' ' + (iosDialog2 ? 'hasHigh' : '')" :style="'overflow: ' + (iosDialog2 ? 'hidden' : '')">
            <view class="weui-cells__group weui-cells__group_form" style="padding-top: 10px">
                <view class="weui-cells weui-cells_form" style="margin-top: 10px">
                    <!-- <view class="display-flex mt12" style="padding: 0 16px;">
        <view class="c6" style="width: 80px;">状态</view>
        <view class="flex-1 tr" style="color: var(--color-ysd);">{{userinfo.statusName}}</view>
      </view>-->
                    <!-- {{userinfo.status}} -->
                    <!-- <view class="display-flex mt12 mb10" style="padding: 0 16px;">
        <view class="c6" style="width: 80px;">代理</view>
        <view class="flex-1 c3 tr">{{userinfo.agencyName || '-'}}</view>
      </view>-->
                    <!-- <view class="display-flex mt12 mb10" style="padding: 0 16px;">
        <view class="c6" style="width: 80px;">报名人</view>
        <view class="flex-1 c3 tr" catchtap="changeAgency">
          <icon class="iconfont icon-bianji mr4" type size="16" color></icon>
          {{userinfo.applyUserName || '-'}}
        </view>
      </view> -->
                    <view class="display-flex mt12" style="padding: 0 16px">
                        <view class="c6" style="width: 100px">报名时间</view>
                        <view class="flex-1 tr">{{ userinfo.createTime || '-' }}</view>
                    </view>
                    <!-- wx:if="{{userinfo.status == 25}}" -->
                    <view class="display-flex mt12 mb10" style="padding: 0 16px">
                        <view class="c6" style="width: 100px">面试时间</view>
                        <view class="flex-1 c3 tr">{{ userinfo.interviewTime || '-' }}</view>
                    </view>
                    <!-- <view class="fsa mt12 mb10" wx:if="{{userinfo.status != 21}}" style="padding: 0 16px;">
        <view class="c6" style="width: 80px;">参与统计</view>
        <view class="flex-1 c3 tr" catchtap="changeJoin">
          <icon class="iconfont icon-bianji mr4" type size="16" color></icon>
          {{joinCountList[joinVal].label || '-'}}
        </view>
      </view>-->
                    <!-- <view class="display-flex mt12 mb10" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">代理编号</view>
          <view class="flex-1 c3 tr">{{userinfo.agencyCode}}</view>
      </view>-->
                    <view style="clear: both; height: 1rpx; width: 100%; background-color: var(--weui-FG-3); transform: scaleY(0.5); position: relative"></view>

                    <block v-if="false">
                        <view class="display-flex mt12" style="padding: 0 16px" v-if="userinfo.status == 10 || userinfo.status == 20">
                            <view class="c6" style="width: 100px">预计到达时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.receptionTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 30">
                            <view class="c6" style="width: 100px">预约入职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.willEntryTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 40">
                            <view class="c6" style="width: 100px">入职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.entryTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 48">
                            <view class="c6" style="width: 100px">预约离职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.willLeaveTime || '-' }}</view>
                        </view>
                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 50">
                            <view class="c6" style="width: 100px">离职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.leaveTime || '-' }}</view>
                        </view>

                        <view
                            class="display-flex mt12 mb10"
                            style="padding: 0 16px"
                            v-if="userinfo.status == 21 || userinfo.status == 26 || userinfo.status == 35 || userinfo.status == 45"
                        >
                            <view class="c6" style="width: 100px">工单完成时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.updateTime || '-' }}</view>
                        </view>
                    </block>

                    <block v-if="false">
                        <block v-if="userinfo.status == 10 || userinfo.status == 20 || userinfo.status == 25">
                            <view class="display-flex mt12" style="padding: 0 16px">
                                <view class="c6" style="width: 100px">预计到达时间</view>
                                <view class="flex-1 c3 tr">
                                    <picker
                                        mode="multiSelector"
                                        :value="dateTime"
                                        @change="changeDateTime"
                                        @columnchange="changeDateTimeColumn"
                                        :range="dateTimeArray"
                                        style="color: #333"
                                    >
                                        {{ !!currentTime ? currentTime : '----' }}
                                        <i class="iconfont icon-rili f16 ml4 dib pr c9" style="line-height: 1"></i>
                                    </picker>
                                </view>
                            </view>
                        </block>
                        <block v-else>
                            <view class="display-flex mt12" style="padding: 0 16px">
                                <view class="c6" style="width: 100px">预计到达时间</view>
                                <view class="flex-1 c3 tr">{{ userinfo.receptionTime || '-' }}</view>
                            </view>
                        </block>

                        <view
                            class="display-flex mt12 mb10"
                            style="padding: 0 16px"
                            v-if="
                                userinfo.status == 25 ||
                                userinfo.status == 30 ||
                                userinfo.status == 35 ||
                                userinfo.status == 40 ||
                                userinfo.status == 45 ||
                                userinfo.status == 48 ||
                                userinfo.status == 50
                            "
                        >
                            <view class="c6" style="width: 100px">接到时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.interviewOperateTime || '-' }}</view>
                        </view>
                        <block v-if="userinfo.status == 10 || userinfo.status == 20 || userinfo.status == 25">
                            <view class="display-flex mt12 mb10" style="padding: 0 16px">
                                <view class="c6" style="width: 100px">面试时间</view>
                                <view class="flex-1 c3 tr">
                                    <picker
                                        mode="multiSelector"
                                        :value="dateTime2"
                                        @change="changeDateTime2"
                                        @columnchange="changeDateTimeColumn2"
                                        :range="dateTimeArray"
                                        style="color: #333"
                                    >
                                        {{ !!currentTime2 ? currentTime2 : '----' }}
                                        <i class="iconfont icon-rili f16 ml4 dib pr c9" style="line-height: 1"></i>
                                    </picker>
                                </view>
                            </view>
                        </block>
                        <block v-else>
                            <view class="display-flex mt12 mb10" style="padding: 0 16px">
                                <view class="c6" style="width: 100px">面试时间</view>
                                <view class="flex-1 c3 tr">{{ userinfo.interviewTime || '-' }}</view>
                            </view>
                        </block>

                        <view
                            class="display-flex mt12 mb10"
                            style="padding: 0 16px"
                            v-if="userinfo.status == 30 || userinfo.status == 40 || userinfo.status == 45 || userinfo.status == 48 || userinfo.status == 50"
                        >
                            <view class="c6" style="width: 100px">预约入职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.willEntryTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 40 || userinfo.status == 48 || userinfo.status == 50">
                            <view class="c6" style="width: 100px">入职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.entryTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 48 || userinfo.status == 50">
                            <view class="c6" style="width: 100px">预约离职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.willLeaveTime || '-' }}</view>
                        </view>

                        <view class="display-flex mt12 mb10" style="padding: 0 16px" v-if="userinfo.status == 50">
                            <view class="c6" style="width: 100px">离职时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.leaveTime || '-' }}</view>
                        </view>
                        <view
                            class="display-flex mt12 mb10"
                            style="padding: 0 16px"
                            v-if="userinfo.status == 21 || userinfo.status == 26 || userinfo.status == 35 || userinfo.status == 50"
                        >
                            <view class="c6" style="width: 100px">工单完成时间</view>
                            <view class="flex-1 c3 tr">{{ userinfo.updateTime || '-' }}</view>
                        </view>
                    </block>

                    <view class="tc f14 c9" style="line-height: 42px" hover-class="hcb" @click.stop="ifZhedie" v-if="false">
                        收起
                        <i class="iconfont icon-shouqi"></i>
                    </view>
                    <view class="tc f14 c9" style="line-height: 42px" hover-class="hcb" @click.stop="ifZhankai" v-if="false">
                        展开
                        <i class="iconfont icon-xiala1"></i>
                    </view>
                </view>
            </view>

            <view class="container">
                <view class="p10 bgf mb10">
                    <view class="display-flex">
                        <view class="flex-1">
                            <view class="f16 c3 fwb">
                                <text v-if="userinfo.userName">{{ userinfo.userName }}</text>
                                <text v-if="userinfo.sex">/{{ userinfo.sex == '1' ? '男' : '女' }}</text>
                                <text v-if="userinfo.age">/{{ userinfo.age }}岁</text>
                                <text v-if="userinfo.nation">/{{ userinfo.nation }}</text>
                            </view>
                        </view>
                        <!-- <view class="iconClass c3 f12">
          <view class="dib mr16" catchtap="showInfo">
            <view class="iconfont icon-yulan mr4 dib"></view>预览
          </view>
          <view class="dib" catchtap="editBill">
            <view class="iconfont icon-bianji mr4 dib"></view>编辑
          </view>
        </view> -->

                        <!-- <view class="iconfont icon-bianji mr10" catchtap="editUser" style="color: var(--color-ysd);"></view> -->
                    </view>

                    <view class="f16 c9 mb8">{{ userinfo.address || '-' }}</view>
                    <view class="display-flex mt6">
                        <view class="flex-1">
                            <i
                                class="t-icon t-icon-shenfenzheng4"
                                v-if="userinfo.idCard == '' || userinfo.idCard == null || userinfo.idCard == 'undefined'"
                                style="width: 24px; height: 24px; vertical-align: bottom"
                            ></i>
                            <i class="t-icon t-icon-shenfenzheng2" v-else style="width: 24px; height: 24px; vertical-align: bottom"></i>
                            <text class="c6 f15 ml6">{{ userinfo.idCard == '' || userinfo.idCard == null || userinfo.idCard == 'undefined' ? '-' : userinfo.idCard }}</text>
                        </view>
                        <view style="min-width: 120px; top: -1px" class="pr">
                            <i
                                class="t-icon t-icon-dianhua8"
                                v-if="userinfo.tel == '' || userinfo.tel == null || userinfo.tel == 'undefined'"
                                style="width: 24px; height: 24px; vertical-align: bottom"
                            ></i>
                            <i class="t-icon t-icon-dianhua6" v-else style="width: 24px; height: 24px; vertical-align: bottom"></i>
                            <text class="c6 f15 ml6">{{ userinfo.tel == '' || userinfo.tel == null || userinfo.tel == 'undefined' ? '-' : userinfo.tel }}</text>
                        </view>
                    </view>

                    <image
                        :src="item.url"
                        :data-src="item.url"
                        @click.stop="showImgs"
                        mode="aspectFill"
                        style="width: 72px; height: 72px; border-radius: 4px; margin-right: 8px; margin-top: 10px"
                        v-for="(item, index) in files"
                        :key="index"
                    ></image>
                </view>

                <view class="weui-cells__group weui-cells__group_form" style="margin-top: 10px">
                    <view class="weui-cells weui-cells_form" style="margin-top: 0; padding-bottom: 10px">
                        <view class="display-flex mt12" style="padding: 0 16px">
                            <view class="c6" style="width: 80px">报名岗位</view>
                            <view class="flex-1 tr fwb">{{ userinfo.storeJobName ? userinfo.storeJobName : '-' }}</view>
                        </view>

                        <view class="display-flex mt12" style="padding: 0 16px">
                            <view class="c6" style="width: 80px">报名企业</view>
                            <view class="flex-1 c3 tr">{{ userinfo.storeName ? userinfo.storeName : '-' }}</view>
                        </view>

                        <!-- <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">报名时间</view>
          <view class="flex-1 c3 tr">{{userinfo.createTime?userinfo.createTime:'-'}}</view>
        </view>
        <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">员工薪资</view>
          <view class="flex-1 c3" style="white-space:pre-line">{{userinfo.employeeSalary?userinfo.employeeSalary:'-'}}</view>
        </view>
        <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">代理政策</view>
          <view class="flex-1 c3" style="white-space:pre-line">{{userinfo.policy?userinfo.policy:'-'}}</view>
        </view>
        <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">政策选择</view>
          <view class="flex-1 c3 tar" style="white-space:pre-line">{{userinfo.policyIdx?'政策' + dateUtil.changeNum(userinfo.policyIdx):'-'}}</view>
        </view>
        <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">面试说明</view>
          <view class="flex-1 c3 tr" style="white-space:pre-line">{{userinfo.interviewDesp?userinfo.interviewDesp:'-'}}</view>
        </view>
        <view class="display-flex mt12" style="padding: 0 16px;">
          <view class="c6" style="width: 80px;">备注</view>
          <view class="flex-1 c3 tar" style="white-space:pre-line">{{userinfo.desp?userinfo.desp:'-'}}</view>
        </view> -->
                    </view>
                </view>
                <!-- <view bindtap="editBill" class="editClass bgf" hover-class="hcb">编辑</view> -->
                <!-- userinfo.status != 21 -->
                <view class="pr bgf p12 mt10 pt0" v-if="false">
                    <view class="fsa pl4" style="line-height: 48px" hover-class="none" :hover-stop-propagation="false">
                        <view class="c6" hover-class="none" :hover-stop-propagation="false">面试地址</view>
                        <view
                            class="fsa"
                            hover-class="none"
                            :hover-stop-propagation="false"
                            @tap="chooseMap2"
                            :data-postitle="storeInfo.interview.posTitle"
                            :data-poscontent="storeInfo.interview.posContent"
                            :data-lat="storeInfo.interview.latitude"
                            :data-lng="storeInfo.interview.longitude"
                            :data-id="storeInfo.interview.id"
                        >
                            <view class="oelps" style="max-width: 220px" hover-class="none" :hover-stop-propagation="false">{{ storeInfo.interview.posContent }}</view>
                            <i class="iconfont icon-gengduo11 c9"></i>
                        </view>
                    </view>
                    <view class="p12 br8" hover-class="none" style="background: #e8e8e8" :hover-stop-propagation="false">
                        <view class="f14 mr4 fr border1 pl4 pr4" hover-class="thover" :data-content="onSiteRemark" @click.stop="setCopy" style="border-color: #ccc">
                            复制
                        </view>
                        <view class="fw500 mb12" hover-class="none" :hover-stop-propagation="false">驻场信息</view>
                        <!-- <view class="fwb">{{storeInfo.jobName != '' || storeInfo.jobName != 'undefined' ? storeInfo.jobName :'-'}}</view> -->
                        <view class style="white-space: pre-wrap; line-height: 1.3" hover-class="none" :hover-stop-propagation="false">{{ onSiteRemark }}</view>
                        <!-- <view wx:for="{{telStr}}" wx:key="*this" wx:for-item="item" wx:for-index="idx">
            <text class="fwb">驻场：</text>
            {{item}}
        </view>-->
                    </view>
                </view>
                <view class="ui-list ui-list-text ui-step bgf br8 mt10" style="border-top: 0; margin-bottom: 0px" v-if="false">
                    <view class="f16 mb18 bb4" style="margin-left: 30rpx">跟进记录</view>
                    <block v-for="(group, key) in testMap" :key="key">
                        <view class="titleMain">
                            <view v-if="dateUtil.spliceStr(key) == '1'">
                                <i class="iconfont icon-shenhezhong"></i>
                                报名审核中
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '2'">
                                <i class="iconfont icon-baomingchenggong"></i>
                                报名成功
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '3'">
                                <i class="iconfont icon-mianshitongguo"></i>
                                待入职
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '4'">
                                <i class="iconfont icon-ruzhichenggong"></i>
                                在职中
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '5'">
                                <i class="iconfont icon-yilizhi"></i>
                                已离职
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '6'">
                                <i class="iconfont icon-baomingchenggong"></i>
                                已完成
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '9'">
                                <i class="iconfont icon-yuyuelizhi"></i>
                                约离职
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '11'">
                                <i class="iconfont icon-wei"></i>
                                报名失败
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '12'">
                                <i class="iconfont icon-yijiedao"></i>
                                已接到
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '13'">
                                <i class="iconfont icon-wei"></i>
                                未接到
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '14'">
                                <i class="iconfont icon-wei"></i>
                                面试未通过
                            </view>
                            <view v-if="dateUtil.spliceStr(key) == '15'">
                                <i class="iconfont icon-wei"></i>
                                未入职
                            </view>
                        </view>

                        <view class="ui-step-one" v-for="(item, index) in group" :key="index">
                            <view class="cb-cricle"></view>

                            <view class="ui-list-info" :style="'padding-bottom: ' + (item.desp == '' ? '18px' : '24px') + ';'">
                                <!-- <view class="f14 c3"> <text style="color: var(--color-027);position: relative;top: -3px;">{{item.statusText}}</text></view> -->
                                <view class="f12 c6" style="white-space: pre-line" v-if="item.desp != ''">
                                    {{ item.desp }}
                                    <block v-if="item.policy">
                                        <text class="ml12" style="color: var(--color-027)" @click.stop="showInfo2" :data-detail="item.policy">详情</text>
                                    </block>
                                </view>
                                <view :class="'f12 c9 ' + (item.desp == '' ? 'prtop8' : '')">
                                    {{}}
                                    <text class>{{ dateUtil.formatDateYYYYMMDDHHMM(item.createTime) }}</text>
                                </view>
                            </view>
                        </view>
                    </block>

                    <!-- <view wx:for="{{userServeRecords}}" class="ui-step-one" wx:key>
        <view class="cb-cricle"></view>
        <view class="ui-list-info" style="padding-bottom: {{item.desp == '' ? '18px' : '24px'}};">
          <view class="f14 c3"> <text style="color: var(--color-027);position: relative;top: -3px;">{{item.statusText}}</text></view>
          <view class="f12 c6" style="white-space: pre-line;" wx:if="{{item.desp != ''}}">{{item.desp}}</view>
          <view class="f12 c9 {{item.desp == '' ? 'prtop8' : ''}}">{{item.creator}} <text class="ml8">{{dateUtil.timeago(item.createTime)}}</text></view>
        </view>
      </view>-->
                </view>

                <view class="userinfo" v-if="false">
                    <view class="username">
                        <text>状态</text>
                        <view style="color: var(--color-ysd)" @tap="showDrawer">
                            {{ userinfo.statusName }}
                            <i class="iconfont icon-gengduo1" style="margin-left: 4px"></i>
                        </view>
                    </view>
                    <view class="agency mb10" style="border: none">
                        <text>代理</text>
                        <text>{{ userinfo.agencyName }}</text>
                    </view>
                </view>
                <view class="userinfo" v-if="false">
                    <view class="store">
                        <view>报名企业</view>
                        <view>{{ userinfo.storeName ? userinfo.storeName : '-' }}</view>
                    </view>
                    <view class="storeJob" hover-class="none" :hover-stop-propagation="false">
                        <view>岗位</view>
                        <view>{{ userinfo.storeJobName ? userinfo.storeJobName : '-' }}</view>
                    </view>
                    <view v-if="userinfo.status == 40" class="storeJob" hover-class="none" :hover-stop-propagation="false">
                        <view>入职时间</view>
                        <view>{{ userinfo.entryTime ? userinfo.entryTime : '-' }}</view>
                    </view>
                    <view v-else-if="userinfo.status == 50" class="storeJob" hover-class="none" :hover-stop-propagation="false">
                        <view>离职时间</view>
                        <view>{{ userinfo.leaveTime ? userinfo.leaveTime : '-' }}</view>
                    </view>
                    <view v-else class="storeJob" hover-class="none" :hover-stop-propagation="false">
                        <view>面试时间</view>
                        <view>{{ userinfo.interviewTime ? userinfo.interviewTime : '-' }}</view>
                    </view>
                    <view class="storeJob" hover-class="none" :hover-stop-propagation="false">
                        <view style="display: flex; align-items: center">政策</view>
                        <view style="max-width: 250px; white-space: pre-wrap">{{ userinfo.policy ? userinfo.policy : '-' }}</view>
                    </view>
                    <view class="drawerBox">
                        <view :class="'drawerMask ' + (drawerShow ? 'showDrawer' : '')" @tap="hideDrawer"></view>
                        <view :class="'drawer ' + (drawerShow ? 'showDrawer' : '')">
                            <scroll-view :scroll-y="true" class="followContent">
                                <view class="followSubset" v-for="(item, index) in currentList" :key="index">
                                    <view class="beforeball"></view>

                                    <view>
                                        <view>
                                            <text user-select class="orderType">{{ item.orderType }}</text>
                                            <text class="timeinfo">{{ item.timeinfo }}</text>
                                        </view>
                                        <view>
                                            <text class="remark">{{ item.remark }}</text>
                                        </view>
                                    </view>
                                </view>
                                <span @click="showMore" class="loadMore" v-if="isShowMore">
                                    <text class="t-icon t-icon-xiala1"></text>
                                    查看更多
                                </span>
                                <span class="loadMore" v-if="!isShowMore">
                                    <!-- <text class="t-icon t-icon-xiala1"></text> -->
                                    暂无更多数据
                                </span>
                            </scroll-view>
                        </view>
                    </view>
                </view>
                <!-- <view class="statusbox">
    <view class="status callphone">
      <view>状态</view>
      <view class="statuschange">
        <view class="" selectable="false" space="false" decode="false" mark:statuscode='{{1}}' bindtap='changeStatus'>
          <view class="t-icon t-icon-xuanzhong" wx:if='{{statuschange === 1}}'></view>
          <view class="t-icon t-icon-weixuanzhong" wx:else></view>
          <view>继续跟进</view>
        </view>
        <view class="" selectable="false" space="false" decode="false" mark:statuscode='{{2}}' bindtap='changeStatus'>
          <view class="t-icon t-icon-xuanzhong" wx:if='{{statuschange === 2}}'></view>
          <view class="t-icon t-icon-weixuanzhong" wx:else></view>
          <view>推工作</view>
        </view>
      </view>
    </view>
    <view class="remark">
      <view class="" hover-class="none" hover-stop-propagation="false">备注</view>
      <view class="weui-cells weui-cells_form">
        <view class="weui-cell" hover-class="weui-cell_active">
          <view class="weui-cell__bd">
            <textarea class="weui-textarea" placeholder="请在此输入跟进结果" placeholder-class="weui-input__placeholder" rows="3"></textarea>
          </view>
        </view>
      </view>
    </view>
  </view>
    <navigator class="weui-btn weui-btn_primary" aria-role="button" hover-class='thover' url="javascript:">提交</navigator>-->
            </view>
        </view>
        <scroll-view class="fadeIn" v-if="iosDialog1" style="position: relative; z-index: 999">
            <view class="weui-mask"></view>
            <view class="weui-dialog">
                <view class="weui-dialog__hd">
                    <strong class="weui-dialog__title">老乡信息</strong>
                </view>
                <view class="weui-dialog__bd wbv0">
                    <view class="f16 c3 mb8">
                        <text style="min-width: 90px" class="dib tr">姓名：</text>
                        <text v-if="userinfo.userName">{{ userinfo.userName }}</text>
                        <text v-if="userinfo.sex">/{{ userinfo.sex == '1' ? '男' : '女' }}</text>
                        <text v-if="userinfo.age">/{{ userinfo.age }}岁</text>
                        <text v-if="userinfo.nation && userinfo.nation != '族'">/{{ userinfo.nation }}</text>
                    </view>

                    <view class="f16 c3 mb8">
                        <text style="min-width: 90px" class="dib tr">身份证号：</text>
                        <text>{{ userinfo.idCard == '' || userinfo.idCard == null || userinfo.idCard == 'undefined' ? '-' : userinfo.idCard }}</text>
                    </view>

                    <view class="f16 c3 mb8">
                        <text style="min-width: 90px" class="dib tr">企业岗位：</text>
                        <text>{{ userinfo.storeJobName }}</text>
                    </view>
                    <view class="f16 c3 mb8">
                        <text style="min-width: 90px" class="dib tr">面试时间：</text>
                        <text>{{ interviewTime }}</text>
                    </view>

                    <view class="f16 c3 mb8">
                        <text style="min-width: 90px" class="dib tr">电话：</text>
                        <text style="color: #576b95">{{ userinfo.tel == '' || userinfo.tel == null || userinfo.tel == 'undefined' ? '-' : userinfo.tel }}</text>
                    </view>
                </view>
                <view class="weui-dialog__ft">
                    <view aria-role="button" class="weui-dialog__btn weui-dialog__btn_default" @tap="copyClose">复制文本</view>
                    <view aria-role="button" class="weui-dialog__btn weui-dialog__btn_primary" @tap="close1">知道了</view>
                </view>
            </view>
        </scroll-view>

        <scroll-view class="fadeIn" v-if="iosDialog2" style="position: relative; z-index: 999">
            <view class="weui-mask" @touchmove.stop.prevent="preventTouchMove"></view>
            <view class="weui-dialog">
                <view class="weui-dialog__hd" style="border-bottom: 1px solid #eee; padding: 12px 12px">
                    <strong class="weui-dialog__title">报名信息</strong>
                </view>
                <view class="weui-dialog__bd wbv0" style="margin-bottom: 0">
                    <view class="f16 c3 mb8 mt8 display-flex">
                        <text style="min-width: 90px" class="dib tr">姓名：</text>
                        <view class hover-class="none" :hover-stop-propagation="false">
                            <text class="fwb" v-if="recordDetail.userName">{{ recordDetail.userName }}</text>
                            <text class="fwb" v-if="recordDetail.sex">/{{ recordDetail.sex == '1' ? '男' : '女' }}</text>
                            <text class="fwb" v-if="recordDetail.age">/{{ recordDetail.age }}岁</text>
                            <text class="fwb" v-if="recordDetail.nation && recordDetail.nation != '族'">/{{ recordDetail.nation }}</text>
                        </view>
                    </view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">电话：</text>
                        <text style="color: #576b95">{{ recordDetail.tel == '' || recordDetail.tel == null || recordDetail.tel == 'undefined' ? '-' : recordDetail.tel }}</text>
                    </view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">身份证号：</text>
                        <text>{{ recordDetail.idCard == '' || recordDetail.idCard == null || recordDetail.idCard == 'undefined' ? '-' : recordDetail.idCard }}</text>
                    </view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">家庭住址：</text>
                        <text>{{ recordDetail.address == '' || recordDetail.address == null || recordDetail.address == 'undefined' ? '-' : recordDetail.address }}</text>
                    </view>

                    <view style="border-top: 1px dashed #eeeeee; margin-top: 10px; margin-bottom: 10px"></view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">报名岗位：</text>
                        <text class="fwb">{{ recordDetail.storeJobName || '-' }}</text>
                    </view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">员工薪资：</text>
                        <text>{{ recordDetail.employeeSalary || '-' }}</text>
                    </view>

                    <view class="f16 c3 mb8 display-flex">
                        <text style="min-width: 90px" class="dib tr">代理政策：</text>
                        <text>{{ recordDetail.policy || '-' }}</text>
                    </view>

                    <!-- <view class="f16 c3 mb8">
              <text style="min-width:90px" class="dib tr">面试时间：</text>
              <text>{{interviewTime}}</text>
      </view>-->
                    <!-- <view class="f16 c3 mb8" wx:if="{{isTimeShowDbl && status != 30  && status != 48 && status != 50 && status != 35}}">
              <text style="min-width:90px" class="dib tr">{{timeText2}}：</text>
              <text>{{timeStr2}}</text>
            </view>

            <view class="f16 c3 mb8" wx:if="{{isTimeShow}}">
              <text style="min-width:90px" class="dib tr">{{timeText}}：</text>
              <text>{{timeStr}}</text>
            </view>

            <view class="f16 c3 mb8"  wx:if="{{isTimeShowDbl && (status == 30 ||  status == 48)}}">
              <text style="min-width:90px" class="dib tr">{{timeText2}}：</text>
              <text>{{timeStr2}}</text>
      </view>-->

                    <!-- <view class="weui-cell" wx:if="{{item.isTimeShowDbl && (item.status == 30 ||  item.status == 48)}}">
          <view class="weui-cell__hd"><label class="weui-label c085">{{item.timeText2}}</label></view>
          <view class="weui-cell__bd tr">{{item.timeStr2}}</view>
      </view>-->
                </view>
                <view class="weui-dialog__ft">
                    <view aria-role="button" class="weui-dialog__btn weui-dialog__btn_default" @tap="copyClose2">复制文本</view>
                    <view aria-role="button" class="weui-dialog__btn weui-dialog__btn_primary" @tap="close2">知道了</view>
                </view>
            </view>
        </scroll-view>
        <view aria-role="dialog" :aria-modal="true" @touchmove.stop.prevent="modalMove" class="fadeIn" v-if="editModal">
            <view class="weui-mask"></view>
            <view class="weui-dialog contact" style="box-sizing: border-box">
                <view class="mt20" hover-class="none" :hover-stop-propagation="false">提示</view>
                <view class>
                    <view class="mt12" hover-class="none" :hover-stop-propagation="false">工单已在处理中...</view>
                    <view class="bb1" style="padding-bottom: 24px" hover-class="none" :hover-stop-propagation="false">如有修改请联系客户经理</view>
                    <view class="mt24" hover-class="none" :hover-stop-propagation="false">
                        <view class="info">
                            <image
                                class="mr8"
                                :src="serviceInfo.avatar || 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/service.jpg'"
                                mode="aspectFit|aspectFill|widthFix"
                                :lazy-load="false"
                            ></image>
                            <view class hover-class="none" :hover-stop-propagation="false">
                                <view class="tal fw500" hover-class="none" :hover-stop-propagation="false">客户经理</view>
                                <view class="fsa" hover-class="none" :hover-stop-propagation="false">
                                    <view class="mr8" hover-class="none" :hover-stop-propagation="false">{{ serviceInfo.userName }}</view>
                                    <view class hover-class="none" :hover-stop-propagation="false">{{ serviceInfo.workPhone || '0371-6611 3723' }}</view>
                                </view>
                            </view>
                        </view>
                    </view>
                    <button class="normalBtn loginOut mt32" @tap="makePhoneCall" hover-class="thover">
                        <i class="iconfont icon-dianhua f20 mr8"></i>
                        {{ serviceInfo.workPhone || '0371-6611 3723' }}
                    </button>
                    <view class="mt20" @tap="closeEditModal" hover-class="thover">取消</view>
                </view>
            </view>
        </view>
        <bottom-drawer :show="joinDrawer" drawerType="joinDrawer" @hidedrawer="hidedrawershow" titleText="参与统计" height="60vh">
            <view slot="title" class="tac" style="height: 54px; line-height: 54px" hover-class="none" :hover-stop-propagation="false">参与统计</view>
            <radio-group class="radio-group" style @change="joinChange" hover-class="none">
                <label class="weui-cell weui-cell_active weui-check__label bb1" hover-class="none" v-for="(item, index) in joinCountList" :key="index">
                    <view class="weui-cell__bd">
                        <view class>{{ item.label }}</view>
                    </view>

                    <view class="weui-cell__ft">
                        <radio class="weui-check" :value="item.value" :checked="item.checked" />
                        <i class="iconfont icon-duihao ysd-base-color" v-if="item.checked"></i>
                    </view>
                </label>
            </radio-group>
            <view class="joinBottom bt1" hover-class="none" :hover-stop-propagation="false">
                <button class="normalBtn loginOut mt0" @tap="joinSelect" style>确定</button>
            </view>
        </bottom-drawer>
        <bottom-drawer :show="selectAgencyDrawer" drawerType="selectAgencyDrawer" @hidedrawer="hidedrawershow" titleText="报名人选择" height="60vh">
            <!-- <view slot="title" class hover-class="none" hover-stop-propagation="false"></view> -->
            <view slot="title" class="tac" style="height: 54px; line-height: 54px" hover-class="none" :hover-stop-propagation="false">报名人选择</view>

            <scroll-view class :scroll-y="true" style="height: calc(60vh - 60px)">
                <radio-group class="radio-group" style @change="radioChange" hover-class="none">
                    <label class="weui-cell weui-cell_active weui-check__label bb1" hover-class="none" v-for="(item, index) in agencyList" :key="index">
                        <view class="weui-cell__bd">
                            <view class>{{ item.aliasName }}</view>
                        </view>

                        <view class="weui-cell__ft">
                            <radio class="weui-check" :value="item.id" :checked="item.checked" />
                            <i class="iconfont icon-duihao ysd-base-color" v-if="item.checked"></i>
                        </view>
                    </label>
                </radio-group>
                <view class="stickyBottom bt1" hover-class="none" :hover-stop-propagation="false">
                    <button class="normalBtn loginOut mt0" @tap="subSelect" style>确定</button>
                </view>
            </scroll-view>
        </bottom-drawer>

        <view
            class="pabtm"
            hover-class="thover9"
            v-if="userinfo.customServiceUrl"
            :data-custom-service-url="userinfo.customServiceUrl"
            @click.stop="kefu"
            :style="'top:' + (systemInfo.windowHeight - 200) + 'px'"
        >
            <i class="iconfont icon-kefu7 cf" style="font-size: 24px; line-height: 36px"></i>
        </view>
    </view>
</template>
<script module="dateUtil" lang="wxs" src="@/common.wxs"></script>
<script>
import bottomDrawer from '../../../components/bottom-drawer/index';
let app = getApp();
import { timeShowXXX, formatDateYMDHM, getUserApplyOrderStatusById, getUserApplyOrderTypeByType, splitRemark, formatDateYMD } from '../../../utils/dateUtil';
var dateTimePicker = require('../../../utils/dateTimePicker.js');
export default {
    components: {
        bottomDrawer
    },
    data() {
        return {
            testMap: [],

            recordDetail: {
                userName: '',
                sex: '',
                age: '',
                nation: '',
                tel: '',
                idCard: '',
                address: '',
                storeJobName: '',
                employeeSalary: '',
                policy: ''
            },

            iosDialog2: false,
            id: null,
            followrecodelist: [],
            statuschange: 1,

            userinfo: {
                createTime: '',
                interviewTime: '',
                status: 0,
                receptionTime: '',
                willEntryTime: '',
                entryTime: '',
                willLeaveTime: '',
                leaveTime: '',
                updateTime: '',
                interviewOperateTime: '',
                userName: '',
                sex: '',
                age: '',
                nation: '',
                address: '',
                idCard: '',
                tel: '',
                storeJobName: false,
                storeName: false,
                agencyName: '',
                policy: false,
                customServiceUrl: ''
            },

            userinfoList: [],
            currentIndex: 3,
            isShowMore: false,
            drawerShow: false,
            iosDialog1: false,
            interviewTime: '',
            zhedie: false,
            editModal: false,

            serviceInfo: {
                avatar: '',
                userName: '',
                workPhone: ''
            },

            selectAgencyDrawer: false,
            joinDrawer: false,
            agencyList: [],

            storeInfo: {
                interview: {
                    posTitle: '',
                    posContent: '',
                    latitude: '',
                    longitude: '',
                    id: ''
                }
            },

            joinCountList: [
                {
                    label: '不参与',
                    value: 0,
                    checked: false
                },
                {
                    label: '参与',
                    value: 1,
                    checked: false
                }
            ],

            joinVal: 0,

            systemInfo: {
                windowHeight: 0
            },

            loginUserInfo: '',
            dateTimeArray: '',
            dateTime: '',
            dateTimeArray2: '',
            dateTime2: '',
            currentTime: '',
            currentTime2: '',
            currentList: '',
            zhuchangInfo: '',
            telStr: '',
            onSiteRemark: '',
            files: '',
            urls: '',
            showDialog: false,
            group: []
        };
    },
    onLoad: function (options) {
        console.log(options);
        setTimeout(() => {
            console.log(app.globalData.loginUserInfo);
            this.setData({
                loginUserInfo: app.globalData.loginUserInfo,
                serviceInfo: app.globalData.serviceInfo
            });
            console.log(app.globalData.serviceInfo);
        }, 100);
        this.setData({
            id: options.storeJobId
        });
        this.getDetail();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onShow: function () {
        var obj = dateTimePicker.dateTimePicker(this.startYear, this.endYear, this.currentTime);
        console.log(obj.dateTimeArray);
        console.log(obj.dateTime);
        for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
            obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + '年';
        }
        for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
            obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + '月';
        }
        for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
            obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + '日';
        }
        let systemInfo = uni.getSystemInfoSync();
        this.getMemberList();
        this.setData({
            systemInfo,
            dateTimeArray: obj.dateTimeArray,
            dateTime: obj.dateTime,
            dateTimeArray2: obj.dateTimeArray,
            dateTime2: obj.dateTime
        });
    },
    onUnload() {
        uni.removeStorageSync('storeJobInfoBill');
        uni.removeStorageSync('townsManInfo');
    },
    methods: {
        showInfo2(e) {
            console.log(e);
            console.log(JSON.parse(e.currentTarget.dataset.detail));
            this.setData({
                iosDialog2: true,
                recordDetail: JSON.parse(e.currentTarget.dataset.detail)
            });
        },

        copyClose2() {
            var that = this;
            var text =
                '姓名：' +
                that.recordDetail.userName +
                '/' +
                (that.recordDetail.sex == 1 ? '男' : '女') +
                '/' +
                that.recordDetail.age +
                '岁' +
                (that.recordDetail.nation == '族' ? '' : '/' + that.recordDetail.nation) +
                '\n电话：' +
                (that.recordDetail.tel == '' || that.recordDetail.tel == undefined || that.recordDetail.tel == null ? '-' : that.recordDetail.tel) +
                '\n身份证号：' +
                (that.recordDetail.idCard == '' ? '-' : that.recordDetail.idCard) +
                '\n家庭地址：' +
                (that.recordDetail.address == '' || that.recordDetail.address == undefined || that.recordDetail.address == null ? '-' : that.recordDetail.address) +
                '\n报名岗位：' +
                that.recordDetail.storeJobName +
                '\n员工薪资：' +
                (that.recordDetail.employeeSalary || '-') +
                '\n代理政策：' +
                that.recordDetail.policy;
            uni.setClipboardData({
                data: text,
                success(res) {
                    uni.getClipboardData({
                        success(res) {
                            console.log(res.data); // data
                            that.close2();
                        }
                    });
                }
            });
        },

        close2: function () {
            console.log('close');
            this.setData({
                iosDialog2: false
            });
        },

        changeDateTime(e) {
            var that = this;
            var dateTimeArray = this.dateTimeArray;
            var dateTime = e.detail.value;
            this.setData({
                // dateTime: e.detail.value,
                currentTime:
                    dateTimeArray[0][dateTime[0]].replace('年', '') +
                    '-' +
                    dateTimeArray[1][dateTime[1]].replace('月', '') +
                    '-' +
                    dateTimeArray[2][dateTime[2]].replace('日', '') +
                    ' ' +
                    dateTimeArray[3][dateTime[3]]
            });
            console.log(this.dateTimeArray);
            console.log(this.currentTime);
            var paramData = {};
            paramData['receptionTime'] = this.currentTime;
            paramData['orderId'] = that.id;
            that.changeStatusTime(paramData);
        },

        changeDateTimeColumn(e) {
            var arr = this.dateTime;
            var dateArr = this.dateTimeArray;
            arr[e.detail.column] = e.detail.value;
            dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
            for (let index = 0; index < dateArr[2].length; index++) {
                dateArr[2][index] = dateArr[2][index] + '日';
            }
            // .replace("年",'').replace("月",'').replace("日",'')

            console.log(dateArr);
            console.log(arr);
            this.setData({
                dateTimeArray: dateArr,
                dateTime: arr
            });
        },

        changeDateTime2(e) {
            var that = this;
            var dateTimeArray = this.dateTimeArray;
            var dateTime = e.detail.value;
            this.setData({
                // dateTime: e.detail.value,
                currentTime2:
                    dateTimeArray[0][dateTime[0]].replace('年', '') +
                    '-' +
                    dateTimeArray[1][dateTime[1]].replace('月', '') +
                    '-' +
                    dateTimeArray[2][dateTime[2]].replace('日', '') +
                    ' ' +
                    dateTimeArray[3][dateTime[3]]
            });
            console.log(this.dateTimeArray);
            var paramData = {};
            paramData['interviewTime'] = this.currentTime2;
            paramData['orderId'] = that.id;
            that.changeStatusTime(paramData);
        },

        changeStatusTime(data) {
            uni.request({
                url: app.globalData.ip + '/yishoudan/user/apply/order/updateOrder',
                data: data,
                header: app.globalData.headers,
                method: 'POST',
                success: function (res) {
                    console.log(res);
                    if (res.data.status == 200) {
                        uni.showToast({
                            title: '修改成功',
                            icon: 'success',
                            duration: 1500
                        });
                        // that.setData({
                        //   storeArray: res.data.data,
                        // });
                    }
                },
                fail: function (res) {}
            });
        },

        editBill() {
            console.log(this.userinfo.status);

            // if (this.data.userinfo.status == 10) {
            uni.navigateTo({
                url: '/pages/billDetail/enroll/index?from=editUser'
            });
            // } else {
            //   this.setData({
            //     editModal: true,
            //   });
            // }
        },

        changeDateTimeColumn2(e) {
            var arr = this.dateTime2;
            var dateArr = this.dateTimeArray;
            arr[e.detail.column] = e.detail.value;
            dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
            for (let index = 0; index < dateArr[2].length; index++) {
                dateArr[2][index] = dateArr[2][index] + '日';
            }
            // .replace("年",'').replace("月",'').replace("日",'')
            this.setData({
                dateTimeArray: dateArr,
                dateTime2: arr
            });
        },

        ifZhedie() {
            this.setData({
                zhedie: false
            });
        },

        ifZhankai() {
            this.setData({
                zhedie: true
            });
        },

        showInfo() {
            this.setData({
                iosDialog1: true
            });
        },

        copyClose() {
            var that = this;
            var text =
                '姓名：' +
                that.userinfo.userName +
                '/' +
                (that.userinfo.sex == 1 ? '男' : '女') +
                '/' +
                that.userinfo.age +
                '岁' +
                (that.userinfo.nation == '族' ? '' : '/' + that.userinfo.nation) +
                '\n身份证号：' +
                (that.userinfo.idCard == '' ? '-' : that.userinfo.idCard) +
                '\n企业岗位：' +
                that.userinfo.storeJobName +
                '\n面试时间：' +
                that.interviewTime +
                '\n电话：' +
                (that.userinfo.tel == '' ? '-' : that.userinfo.tel);
            uni.setClipboardData({
                data: text,
                success(res) {
                    uni.getClipboardData({
                        success(res) {
                            console.log(res.data); // data
                            uni.showToast({
                                title: '内容已复制',
                                icon: 'none',
                                duration: 1500
                            });
                            that.close1();
                        }
                    });
                }
            });
        },

        showImgs(e) {
            var that = this;
            let curr = [];
            that.urls.forEach((item) => {
                curr.push(item.url);
            });
            uni.previewImage({
                current: e.currentTarget.dataset.src,
                // 当前显示图片的 http 链接
                urls: curr // 需要预览的图片 http 链接列表
            });
        },

        close1: function () {
            console.log('close');
            this.setData({
                iosDialog1: false
            });
        },

        makePhoneCall() {
            var that = this;
            uni.makePhoneCall({
                phoneNumber: that.serviceInfo.workPhone || '0371-6611 3723'
            });
        },

        closeEditModal() {
            this.setData({
                editModal: false
            });
        },

        editUser() {
            uni.navigateTo({
                url: '../newEnroll/enrollEdit/index?from=editUser'
            });
        },

        changeAgency() {
            this.agencyList.forEach((item) => {
                item.checked = false;
                if (item.aliasName == this.userinfo.applyUserName) {
                    item.checked = true;
                }
            });
            this.setData({
                selectAgencyDrawer: true,
                agencyList: this.agencyList
            });
        },

        changeJoin() {
            console.log(this.joinCountList);
            this.joinCountList.forEach((item) => {
                item.checked = false;
                if (item.value == this.joinVal) {
                    item.checked = true;
                }
            });
            this.setData({
                joinDrawer: true,
                joinCountList: this.joinCountList
            });
        },

        /**
         * 参与统计变化
         */
        joinCountChange(e) {
            console.log(e);
            this.joinVal = this.joinCountList[e.detail.value].value;
            this.setData({
                joinVal: this.joinVal
            });
            this.updateJoinStatus();
            console.log(this.joinVal);
        },

        /**
         * 参与统计状态上传
         */
        updateJoinStatus() {
            let that = this;
        },

        /**
         * 提交报名人信息
         */
        joinSelect() {
            let that = this;
            console.log(this.joinCountList);
            this.joinCountList.forEach((item) => {
                if (item.checked == true) {
                    this.joinVal = item.value;
                }
            });
            uni.request({
                url: app.globalData.ip + '/yishoudan/user/apply/order/updateStatistic',
                method: 'post',
                data: {
                    userApplyOrderId: that.userinfo.id,
                    statistic: that.joinVal
                },
                header: app.globalData.headers,
                success: function ({ data }) {
                    if (data.status == 200) {
                        uni.showToast({
                            title: '修改成功',
                            icon: 'none'
                        });
                        that.setData({
                            joinDrawer: false
                        });
                        that.getDetail();
                    } else {
                        uni.showToast({
                            title: data.msg,
                            icon: 'none'
                        });
                    }
                }
            });
        },

        joinChange(e) {
            console.log(e);
            this.joinCountList.forEach((item) => {
                item.checked = false;
                if (item.value == e.detail.value) {
                    item.checked = true;
                }
            });
            this.setData({
                joinCountList: this.joinCountList
            });
        },

        radioChange(e) {
            this.agencyList.forEach((item) => {
                item.checked = false;
                if (item.id == e.detail.value) {
                    item.checked = true;
                }
            });
            this.setData({
                agencyList: this.agencyList
            });
        },

        getMemberList() {
            let that = this;
            uni.request({
                url: app.globalData.ip + '/yishoudan/user/getAgencyCorpUsers',
                method: 'GET',
                header: app.globalData.headers,
                success: function (res) {
                    console.log(res);
                    if (res.data.status == 200) {
                        try {
                            res.data.data.recordList.sort((a, b) => {
                                return a.agencyRole - b.agencyRole;
                            });
                            that.setData({
                                agencyList: res.data.data.recordList
                            });
                        } catch (error) {
                            console.log('CatchClause', error);
                            console.log('CatchClause', error);
                            console.log(error);
                        }
                    }
                }
            });
        },

        /**
         * 报名人抽屉隐藏
         *
         *
         */
        hidedrawershow(e) {
            console.log(e);
            this.setData({
                [e.detail.type]: false
            });
        },

        /**
         * 提交报名人信息
         *
         */
        subSelect() {
            let that = this;
            let id;
            console.log(that.recordDetail);
            this.agencyList.forEach((item) => {
                if (item.checked == true) {
                    id = item.id;
                }
            });
            uni.request({
                url: app.globalData.ip + `/yishoudan/user/apply/order/updateApplyUser`,
                header: app.globalData.headers,
                method: 'post',
                data: {
                    userApplyOrderId: that.userinfo.id,
                    userId: id
                },
                success: function (res) {
                    console.log(res);
                    if (res.data.status == 200) {
                        that.setData({
                            selectAgencyDrawer: false
                        });
                        that.getDetail();
                    } else {
                        uni.showToast({
                            title: res.data.msg,
                            icon: 'none'
                        });
                    }
                }
            });
        },

        getDetail() {
            let that = this;
            console.log(that.id);
            uni.request({
                url: app.globalData.ip + `/yishoudan/user/apply/order/details?orderId=${that.id}`,
                header: app.globalData.headers,
                method: 'get',
                success: function (res) {
                    console.log(res);
                    if (res.data.status == 200) {
                        let followInfo = [];
                        let newArr = [];
                        res.data.data.serveRecords.forEach((item, index) => {
                            // console.log(item);
                            if (item.type != 0) {
                                item.orderType = getUserApplyOrderTypeByType(item.type);
                                item.remark = splitRemark(item.desp);
                                newArr.push(item);
                            }
                        });
                        if (res.data.data.serveRecords.legnth > 4) {
                            that.isShowMore = true;
                        }
                        res.data.data.serveRecords = newArr;
                        res.data.data.serveRecords.forEach((item, index) => {
                            item.timeinfo = timeShowXXX(item.createTime);
                            if (index <= that.currentIndex) {
                                followInfo.push(item);
                            }
                        });
                        console.log(res.data.data.serveRecords);
                        let userinfo = res.data.data.applyOrder;
                        userinfo.agencyName = userinfo.agencyName.replace(userinfo.agencyCode, '');
                        console.log(userinfo);
                        uni.setStorageSync('storeJobInfoBill', userinfo);
                        // loginUserInfo: {
                        //   name: "",
                        //   address: "",
                        //   age: "",
                        //   nationality: "",
                        //   sex: "",
                        //   num: "",
                        //   tel: "",
                        //   idCardImageUrl: "",
                        // },
                        let userinfo2 = {};
                        userinfo2['name'] = userinfo.userName;
                        userinfo2['nationality'] = userinfo.nation;
                        userinfo2['num'] = userinfo.idCard;
                        userinfo2['currentImg'] = userinfo.idCardImageUrl;
                        userinfo2['idCardImageUrl'] = userinfo.idCardImageUrl;
                        userinfo2['sex'] = userinfo.sex;
                        userinfo2['age'] = userinfo.age;
                        userinfo2['idCard'] = userinfo.idCard;
                        userinfo2['userId'] = userinfo.userId;
                        userinfo2['tel'] = userinfo.tel;
                        userinfo2['address'] = userinfo.address;
                        uni.removeStorage({
                            key: 'townsManInfo'
                        });
                        uni.removeStorage({
                            key: 'townsManInfoJob'
                        });
                        uni.setStorageSync('townsManInfo', {
                            ...userinfo2
                        });
                        // let data = { ...that.data.loginUserInfo, currentImg: that.data.currentImg };
                        // console.log(data);
                        // wx.setStorage({
                        //   key: "townsManInfo",
                        //   data,
                        // });
                        that.getImgs(userinfo.userId);
                        if (userinfo.entryTime) {
                            userinfo.entryTime = formatDateYMDHM(userinfo.entryTime);
                        }
                        if (userinfo.leaveTime) {
                            userinfo.leaveTime = formatDateYMDHM(userinfo.leaveTime);
                        }
                        if (userinfo.updateTime) {
                            userinfo.updateTime = formatDateYMDHM(userinfo.updateTime);
                        }
                        if (userinfo.interviewTime) {
                            userinfo.interviewTime = formatDateYMDHM(userinfo.interviewTime);
                        }
                        if (userinfo.createTime) {
                            userinfo.createTime = formatDateYMDHM(userinfo.createTime);
                        }
                        if (userinfo.interviewOperateTime) {
                            userinfo.interviewOperateTime = formatDateYMDHM(userinfo.interviewOperateTime);
                        }
                        if (userinfo.passedOperateTime) {
                            userinfo.passedOperateTime = formatDateYMDHM(userinfo.passedOperateTime);
                        }
                        if (userinfo.receptionTime) {
                            userinfo.receptionTime = formatDateYMDHM(userinfo.receptionTime);
                        }
                        if (userinfo.willEntryTime) {
                            userinfo.willEntryTime = formatDateYMDHM(userinfo.willEntryTime);
                        }
                        if (userinfo.willLeaveTime) {
                            userinfo.willLeaveTime = formatDateYMDHM(userinfo.willLeaveTime);
                        }
                        userinfo.statusName = getUserApplyOrderStatusById(userinfo.status);
                        if (userinfo.nation.substr(userinfo.nation.length - 1, 1) != '族' && userinfo.nation.substr(userinfo.nation.length - 1, 1) != '') {
                            userinfo.nation = userinfo.nation + '族';
                        }
                        for (var key in res.data.data.records) {
                            // console.log(key, res.data.data.records[key]);
                            res.data.data.records[key].forEach((item, index) => {
                                item.desp = item.desp.replaceAll('预约接待时间', '预计到达时间');
                                if (item.desp.substr(item.desp.length - 3, 3) == '备注：') {
                                    item.desp = item.desp.replace(/备注：/g, '');
                                }
                                if (item.type == 1) {
                                    item['statusText'] = '报名审核中';
                                } else if (item.type == 2) {
                                    item['statusText'] = '待接待';
                                } else if (item.type == 3) {
                                    item['statusText'] = '待入职';
                                } else if (item.type == 4) {
                                    item['statusText'] = '在职中';
                                } else if (item.type == 5) {
                                    item['statusText'] = '已离职';
                                } else if (item.type == 9) {
                                    item['statusText'] = '约离职';
                                } else if (item.type == 6) {
                                    item['statusText'] = '已完成';
                                } else if (item.type == 11) {
                                    item['statusText'] = '审核未通过';
                                } else if (item.type == 12) {
                                    item['statusText'] = '已接到';
                                } else if (item.type == 13) {
                                    item['statusText'] = '未接到';
                                } else if (item.type == 14) {
                                    item['statusText'] = '面试未通过';
                                } else if (item.type == 15) {
                                    item['statusText'] = '未入职';
                                }
                            });
                        }
                        that.setData({
                            testMap: res.data.data.records
                        });
                        that.setData({
                            currentTime: userinfo.receptionTime,
                            currentTime2: userinfo.interviewTime,
                            interviewTime: formatDateYMD(userinfo.interviewTime),
                            userinfo: userinfo,
                            followrecodelist: res.data.data.serveRecords,
                            currentList: followInfo,
                            isShowMore: that.isShowMore,
                            joinVal: userinfo.inStatistic
                        });

                        // console.log(that.data.userinfo);
                        that.getStoreInfo();
                    }
                }
            });
        },

        getStoreInfo() {
            let that = this;
            uni.request({
                url: app.globalData.ip + `/overall/store/job/getStoreJobDetailById?storeJobId=${that.userinfo.storeJobId}`,
                header: app.globalData.headers,
                method: 'get',
                success: function (res) {
                    console.log(res);
                    let data = res.data.data;
                    if (res.data.status == 200) {
                        var telN = data.storeJob.onSiteInfo.split('\n');
                        that.telStr = [];
                        telN.forEach((item, index) => {
                            item = item.replace(/\d\./, '');
                            that.telStr.push(item);
                        });
                        console.log(that.telStr);
                        that.zhuchangInfo = '驻场:' + that.telStr;
                        console.log(data.storeJob.onSiteRemark);
                        // console.log(data.storeJob.onSiteRemark.split('驻场：'));
                        let markList = data.storeJob.onSiteRemark.split('⚠');
                        console.log(markList);
                        let newMark = markList[0] + `面试时间：${that.userinfo.interviewTime}\n\n` + '⚠' + markList[1];
                        console.log(newMark);
                        that.setData({
                            storeInfo: {
                                ...data.storeJob,
                                ...data.jobPoses
                            },
                            zhuchangInfo: that.zhuchangInfo,
                            telStr: that.telStr,
                            onSiteRemark: newMark
                        });
                    }
                }
            });
        },

        setCopy() {
            var that = this;
            uni.setClipboardData({
                data: that.onSiteRemark,
                success(res) {
                    uni.getClipboardData({
                        success(res) {
                            console.log(res.data); // data
                            uni.showToast({
                                title: '内容已复制',
                                icon: 'none',
                                duration: 1500
                            });
                        }
                    });
                }
            });
        },

        chooseMap2(e) {
            var that = this;
            uni.setClipboardData({
                data: that.onSiteRemark,
                success(res) {
                    uni.getClipboardData({
                        success(res) {
                            uni.showToast({
                                title: '内容已复制',
                                icon: 'none',
                                duration: 1500
                            });
                            setTimeout(() => {
                                console.log(e.currentTarget.dataset.lat);
                                if (e.currentTarget.dataset.lat == '') {
                                    return;
                                }
                                let name = e.currentTarget.dataset.postitle;
                                let content = e.currentTarget.dataset.poscontent;
                                let lat = e.currentTarget.dataset.lat - 0;
                                let lng = e.currentTarget.dataset.lng - 0;
                                uni.openLocation({
                                    latitude: lat,
                                    longitude: lng,
                                    name: name,
                                    address: content,
                                    scale: 15
                                });
                            }, 200);
                        }
                    });
                }
            });
        },

        changeStatus(e) {
            console.log(e.mark.statuscode);
            this.setData({
                statuschange: e.mark.statuscode
            });
        },

        getImgs(userId) {
            var that = this;
            uni.request({
                url: app.globalData.ip + '/imgs/list/' + userId + '?type=20',
                header: app.globalData.headers,
                method: 'GET',
                success: function (res) {
                    console.log(res);
                    let currFils = [];
                    let regs = /\.(jpg|jpeg|png)(\?.*)?$/;
                    if (app.globalData.isNotEmptyCheck(res.data.data.userImgs)) {
                        res.data.data.userImgs.forEach((item) => {
                            if (regs.test(item.url.toLowerCase())) {
                                currFils.push({
                                    url: item.url,
                                    id: item.id
                                });
                            }
                        });
                    }
                    that.setData({
                        files: currFils.slice(0, 4),
                        urls: currFils
                    });
                    // }
                },
                fail: function (res) {
                    console.log(res);
                }
            });
        },

        showMore() {
            let that = this;
            console.log(that.currentList);
            that.currentList = [];
            that.currentIndex += 4;
            that.followrecodelist.forEach((item, index) => {
                if (index < that.currentIndex) {
                    that.currentList.push(item);
                }
            });
            if (that.followrecodelist.length > that.currentList.length) {
                that.isShowMore = true;
            } else {
                that.isShowMore = false;
            }
            that.setData({
                currentList: that.currentList,
                currentIndex: that.currentIndex,
                isShowMore: that.isShowMore
            });
        },

        showImg() {
            uni.previewImage({
                current: this.userinfo.idCardImageUrl,
                // 当前显示图片的http链接
                urls: [this.userinfo.idCardImageUrl] // 需要预览的图片http链接列表
            });
        },

        showDrawer() {
            this.setData({
                drawerShow: true
            });
        },

        hideDrawer() {
            this.setData({
                drawerShow: false
            });
        },

        preventTouchMove(e) {
            // e.preventDefault;
        },

        /**
         * 阻止滑动穿透
         *
         *
         */
        modalMove() {
            return false;
        },

        kefu(e) {
            console.log(e);
            let url = e.currentTarget.dataset.customserviceurl;
            uni.openCustomerServiceChat({
                extInfo: {
                    url: url || 'https://work.weixin.qq.com/kfid/kfc84d8465f4c633511'
                },
                showMessageCard: true,
                corpId: 'wwc227639d3a136c8d',
                success(res) {
                    console.log('res', res);
                },
                fail(err) {
                    console.log('err', err);
                }
            });
        }
    }
};
</script>
<style>
@import './index.css';
</style>
