<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" href="../../css/select.css">
    <style>
        body {
            background: #fff;
        }

        .api_layout {
            background: #fff;
            width: 100%;
            /*margin-top: -10px;*/
        }

        /*.column {
            margin-bottom: 10px;
        }*/

        .aui-row {
            border: 1px dashed #c8d2de;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            padding: 10px;
        }

        .technological-process {
            margin-top: 10px;
        }
        /*****/
        /*审批进度条*/

        .layui-timeline {
            padding-left: 5px;
        }

        .layui-timeline-item {
            position: relative;
            padding-bottom: 20px;
        }

        .layui-timeline-item:first-child:before {
            display: block;
        }

        .layui-timeline-item:before {
            content: '';
            position: absolute;
            left: 5px;
            top: 0;
            z-index: 0;
            width: 1px;
            height: 100%;
        }

        .layui-timeline-item:before,
        hr {
            background-color: #e6e6e6;
        }

        .layui-timeline-item img{
            font-size: 12px;
            /*font-weight: bold;*/
            position: absolute;
            left: -5px;
            top: 0;
            z-index: 10;
            width: 20px;
            height: 20px;
            line-height: 20px;
            background-color: #fff;
            border-radius: 50%;
            text-align: center;
            cursor: pointer;
            margin-top: 2px;
        }

        .Correct {
            color: #5FB878;
            border: 1px solid #5FB878;
        }

        .closes {
            color: red;
            border: 1px solid red;
        }

        .layui-timeline-content {
            padding-left: 25px;
            align-items: center;
        }

        .layui-text {
            line-height: 22px;
            font-size: 14px;
            color: #666;
        }

        .layui-timeline-title {
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

        .layui-timeline-reamrk-text {
          color: #4BC612;
          display: flex;
          align-items: center;
        }
        .remark {
            padding: 3px 0 0 2px;
            border-radius: 2px;
            display: none;
        }
        /******/

        .aui-list-item-input label {
            font-size: 14px;
            height: 21px;
            display: inline-block;
            line-height: 22px;
            margin-right: 5px;
        }

        .aui-list-item-input label:last-child {
            margin-right: 0;
        }

        .itmes li {
            display: flex;
            justify-content: space-between;
            flex-wrap: nowrap;
            padding: 10px 0;
            position: relative;
        }

        .itmes li p:first-child {
            width: 33%;
            color: #2c3e50;
            font-size: 15px;
        }

        .itmes li p:last-child {
            margin-left: 2%;
            width: 65%;
            color: #3498db;
        }

        .header-img {
            width: 50px;
            height: 50px;
            -webkit-border-radius: 50%;
            -moz-border-radius: 50%;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }

        .img-title {
            display: flex;
            justify-content: flex-start;
            flex-wrap: nowrap;
        }

        .details-message {
            width: 100%;
            background: #fff;
        }

        .details-message-child {
            padding: 0 15px 15px 15px;
        }

        .personalInfo {
            padding: 10px 0;
        }

        .personalInfo span {
            display: block;
            font-size: 14px;
            color: #6c6f74;
        }

        .personalInfo span:first-child {
            font-size: 18px;
            color: #002257;
        }

        .examine-success {
            background: #1abc9c;
        }

        .examine-red {
            background: #e74c3c;
        }

        .staff_name {
            width: 50px;
            height: 50px;
            -webkit-border-radius: 50%;
            -moz-border-radius: 50%;
            border-radius: 50%;
            margin-right: 10px;
            line-height: 50px;
            text-align: center;
            color: #fff;
        }

        .aui-col-xs-4 img {
            object-fit: cover;
            border-radius: 3px;
            margin: auto;
        }

        .aui-col-xs-4 span {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            padding: 0 3px;
            height: 48px;
            text-align: center;
            margin: 5px 0;
            font-size: 15px;
        }

        .fileList img {
            width: 35px;
            height: 35px;
        }

        .name-column span {
            background: #009fe8;
            padding: 4px 4px 2px 4px;
            color: #fff;
            border-radius: 2px;
            font-size: 13px;
        }

        .column-title {
            display: block;
            font-size: 15px;
            color: #97a3b4;
            /*#2c3e50*/
            margin-bottom: 10px;
        }

        .column-textarea {
            border: 1px solid rgba(200, 210, 222, 1);
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            padding: 10px;
            height: 40px;
        }

        .column-textarea::placeholder {
            font-size: 14px;
            color: #333;
        }
        /*定位*/

        .position-photo-notes {
            padding: 15px;
        }
        .postion-title {
          text-align: center;
        }
        .postion-title div img {
          width: 60px;
          height: 60px;
        }
        /*position*/

        .flex-space {
            display: flex;
            align-items: center;
            white-space: nowrap;
        }

        .flex-start {
            display: flex;
            justify-content: space-between;
            white-space: nowrap;
            align-items: center;
        }

        .ico-map {
            width: 25px;
            height: 25px;
            background: url("../../icon/position.png") no-repeat;
            background-position: center;
            background-size: cover;
        }

        .position-map {
            display: flex;
            align-items: center;
            white-space: nowrap;
            padding: 8px 14px;
            border-radius: 50px;
            background: #F0F0F0;
            font-size: 14px;
            margin-top: 10px;
        }

        .map1 {
            color: #009FE8;
        }

        .again {
            color: #6C6F74;
        }

        .map-name {
            width: 99%;
        }

        .names {
            width: 85%;
        }

        .names .map1 {
            width: 100%;
            padding-top: 3px;
            white-space: pre-wrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            /*font-weight: bold;*/
        }

        .textarea {
            height: 45px;
            line-height: 1.5;
        }
        /*图片上传*/

        .input-recode {
            border: dashed 1px rgba(200, 210, 222, 1);
            display: flex;
            flex-flow: wrap;
            align-items: center;
            line-height: 100%;
        }

        .file-width {
            width: 33.3333333%;
            box-sizing: border-box;
            font-size: 14px;
            color: #333;
        }

        .upload {
            padding-top: 10px;
        }

        .upload img {
            width: 80px;
            height: 80px;
            margin-left: 15px;
        }
        /*图片*/
        /*未提交定位信息的图片容器*/

        .img-item {
            text-align: center;
            line-height: 100%;
        }

        .img-item img {
            width: 80px;
            height: 80px;
            border-radius: 3px;
            object-fit: cover;
        }

        .img-items .upload {
            text-align: center;
        }

        .img-items .upload img {
            width: 80px;
            height: 80px;
            margin: 0;
        }

        .add-message-remark {
            background: #fff;
            border-radius:10px;
            position: relative;
        }

        .add-message-remark-child {
            background: #fff;
            margin: 0 15px 15px 15px;
            border-radius: 5px;
            border:1px solid rgba(224,225,226,1);
        }

        .add-msg-list {
            margin-top: 10px;
        }

        .add-msg-list div {
            width: 100%;
            height: 40px;
            line-height: 40px;
            text-align: center;
            border-radius: 4px;
            color: #fff;
            background: #009fe8;
            font-size: 14px;
        }

        .work-order-remarks {
            color: #2C3E50;
            font-size: 15px;
            font-weight: bold;
        }
        .staff-message {
          /*font-weight:400;*/
          font-size: 14px;
          color:rgba(108,111,116,1);
        }
        .remarkInfo {
          color: #232627;
          margin-bottom: 6px
        }
        .remarkInfo-message {
          background:rgba(236,240,241,1);
          border-radius:2px;
          display: flex;
        }
        .left-line-icon {
          background: #009FE8;
          width: 3px;
          margin: 8px 0;
        }
        .remarkInfo-message div:last-child {
          padding: 7.5px 0 7.5px 10px;
          color: #009FE8;
          /*font-weight: bold;*/
        }

        .more-icon {
            width: 20px;
            height: 20px;
            background: url("../../image/more.png") no-repeat;
            background-position: center;
            background-size: cover;
        }

        .img-item-two {
            position: relative;
            display: inline-block;
            width: 32%;
            margin-left: 6px;
            margin-top: 6px;
        }

        .img-item-two img {
            z-index: 0;
            height: 27vw;
            width: 27vw;
            object-fit: cover;
            border-radius: 5px;
        }

        .notes-content {
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div class="api_layout" id="wordOrder_details">

    </div>
</body>
<script type="text/template" id="template">
    {{?api.pageParam.status == 2}}
    <div class="add-message-remark">
        <div style="height: 15px; width: 100%"></div>
        <div class="add-message-remark-child">
            <!-- 是否定位 -->
            {{?it.open_gps == 1 && it.open_remark == 1}} {{=getLonLat(it.open_gps)}} {{?}}
            <!-- 定位信息 拍照  以及备注信息 -->
            <div class="position-photo-notes">
                <div class="postion-title">
                  <div><img src="../../icon/0001.png"></div>
                  <div class="work-order-remarks">目的地打卡</div>
                  <div class="staff-message">
                    {{=it.staff}}
                  </div>
                </div>
                {{? it.open_gps == 1 && it.open_remark == 1}}
                <div class="position-content" id="position_warp"></div>
                {{?}}
                {{? it.open_gps == 1 && it.open_remark == 2}}
                <div class="position-map" onclick="openMaps('{{=it.longitude}}','{{=it.latitude}}')">
                    <div class="map-name flex-start">
                        <i class="ico-map"></i>
                        <div class="names">
                            <p class="map1">{{=it.address}}</p>
                        </div>
                    </div>
                    <p class="more-icon"></p>
                </div>
                {{?}}
                {{? it.open_remark == 1}}
                <div class="notes-content">
                    <div>
                        <div class="remarkInfo">备注内容：</div>
                        <textarea oninput="Oninput(this)" id="remark_information" class="column-textarea font-s column-textarea1" placeholder="请输入备注信息"></textarea>
                    </div>
                </div>
                {{?}}
                {{? it.open_remark == 2 && JSON.parse(it.remark_info).remarkInfo != ''}}
                <div class="notes-content">
                    <div class="remarkInfo-message">
                        <div class="left-line-icon"></div>
                        <div>备注信息</div>
                    </div>
                    <div style="padding-top: 10px;color: #232627;">
                        {{=JSON.parse(it.remark_info).remarkInfo}}
                    </div>
                </div>
                {{?}}
                <!-- {{? it.open_remark == 1}}
                <div class="modula img-warp">
                    <label class="remarkInfo">现场照片：</label>
                    <div class="text-input input-recode file-items-add img-items photoFile">
                        <div class="upload file-width" onclick="uploadImg('remote',this)">
                            <img src="../../image/upload.png" alt="">
                        </div>
                    </div>
                </div>
                {{?}} -->
                <!-- {{? it.open_remark == 2 && JSON.parse(it.remark_info).imageList.length > 0}}
                <div class="modula img-warp">
                    <label class="remarkInfo">现场照片：</label>
                    <div class="text-input input-recode file-items-add img-items photoFile">
                        {{ for (var i = 0; i
                        < JSON.parse(it.remark_info).imageList.length; i++) { }} <div class="img-dv img-item-two" onclick="browseImgTwo('{{=i}}','{{=JSON.parse(it.remark_info).imageList.toString()}}')">
                            <a href="javascript:;">
                                <img src="{{=JSON.parse(it.remark_info).imageList[i]}}">
                            </a>
                    </div>
                    {{ } }}
                </div>
            </div>
            {{?}}  -->
            {{? it.open_remark == 1}}
            <div class="add-msg-list">
                <div onclick="addPositionNotes()">提交</div>
            </div>
            {{?}}
        </div>
    </div>
    </div>
    {{?}}
    <div class="details-message">
        <div class="details-message-child">
            <div class="personalInfo">
                <div class="img-title">
                    {{?it.staff_avatar === null}}
                    <p class="staff_name" style="background:#{{=Math.random().toString(16).slice(2,8)}}">{{=it.staff.substr(it.staff.length-1,1)}}</p>
                    {{??}}
                    <img src="{{=it.staff_avatar}}" alt="" class="header-img"> {{?}}
                    <div>
                        <span>{{=it.staff}}</span>
                        <span>{{=it.section}}</span>
                    </div>
                </div>
            </div>
            <ul class="itmes">
                <!-- <li>
                    <p>工单编号：</p>
                    <p>#{{=it.id}}</p>
                </li>
                <li>
                    <p>工单分类：</p>
                    <p>{{=it.classify}}</p>
                </li> -->
                <li>
                    <p>流程名称：</p>
                    <p>{{=it.title}}</p>
                </li>
            </ul>
            <ul class="itmes">
                {{ for (var i = 0;i
                <it.form.length;i++) { }} {{?it.form[i].type !='images' && it.form[i].type !='files' }} <li>
                    <p>{{=it.form[i].label}}：</p>
                    <p>{{=it.form[i].value}}</p>
                    </li>
                    {{?}} {{ } }}
            </ul>
            <div class="column-row">
                {{ for (var i = 0;i
                <it.form.length;i++) { }} {{?it.form[i].type=='images' && it.form[i].value.length> 0 }}
                    <div class="column">
                        <label class="column-title">{{=it.form[i].label}}：</label>
                        <div class="aui-row aui-row-padded">
                            {{ for (var j = 0;j
                            <it.form[i].value.length;j++) { }} <div class="aui-col-xs-4">
                                <img src="{{=it.form[i].value[j]}}" class="colsImg" onload="setUpHeight(this)" onclick="browseImg('{{=it.form[i].value}}','{{=j}}')" />
                        </div>
                        {{ } }}
                    </div>
            </div>
            {{?? it.form[i].type == 'files' && it.form[i].value.length > 0 }}
            <div class="column">
                <label class="column-title">{{=it.form[i].label}}：</label>
                <div class="aui-row aui-row-padded fileList">
                    {{ for (var j = 0;j
                    <it.form[i].value.length;j++) { }} {{?it.form[i].value[j].path.endsWith( 'docx') || it.form[i].value[j].path.endsWith( 'doc')}} <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
                        <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
                        <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{??it.form[i].value[j].path.endsWith('pdf')}}
                <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
                    <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
                    <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{??it.form[i].value[j].path.endsWith('ppt') || it.form[i].value[j].path.endsWith('ptx')}}
                <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
                    <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
                    <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{??it.form[i].value[j].path.endsWith('zip') || it.form[i].value[j].path.endsWith('rar')}}
                <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}',true)">
                    <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
                    <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{??it.form[i].value[j].path.endsWith('xlsx')}}
                <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
                    <img src="../../icon/{{=it.form[i].value[j].path.substr(it.form[i].value[j].path.length-3,3)}}.png" />
                    <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{??}}
                <div class="aui-col-xs-4" onclick="browseFile('{{=it.form[i].value[j].path}}')">
                    <img src="../../icon/OTHER.png" />
                    <span>{{=it.form[i].value[j].name}}</span>
                </div>
                {{?}} {{ } }}
            </div>
        </div>
        {{?}} {{ } }}
    </div>
    <div class="technologicals" style="margin-top:10px">
        <label class="column-title">固定审批流程：</label>
        <div class="technological-process">
            {{ for(var prop in it.flows) { }}
            <ul class="layui-timeline">
                <li class="layui-timeline-item">
                    <img src="{{=it.flows[prop].status == 2 ? '../../image/sureCircle.png' : (it.flows[prop].status == 3 ? '../../image/rejectCircle.png':'../../image/waitCircle.png')}} "></i>
                    <div class="layui-timeline-content layui-text">
                        <div class="layui-timeline-title">
                            <span>{{=it.flows[prop].flow_name}}：</span>
                            <div class="name-column">
                                {{ for (var j = 0;j
                                <it.flows[prop].flow.length;j++) { }} <span>{{=it.flows[prop].flow[j]}}</span>
                                    {{ } }}
                            </div>
                        </div>
                        <!-- layui-timeline-title -->
                        <div class="remark layui-timeline-reamrk-text" style="border:1px solid {{=it.flows[prop].status == 2?'#4BC612':(it.flows[prop].status == 3?'red':'')}};display:{{=it.flows[prop].remark?'inline-block':'none'}}; color:{{=it.flows[prop].status == 2 ? '#4BC612' : (it.flows[prop].status == 3 ? 'red' : '')}};">
                            {{=it.flows[prop].remark}}
                        </div>
                    </div>
                </li>
            </ul>
            {{ } }}
        </div>
    </div>
    </div>
    </div>

</script>
<script type="text/template" id="mapTemplate">
    <div class="position-map">
        <div class="map-name flex-start">
            <i class="ico-map"></i>
            <div class="names">
                <p class="map1">{{=it.address}}</p>
            </div>
        </div>
        <p class="again" onclick="getLonLat(1)">重新定位</p>
    </div>
</script>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript">
    var toast = new auiToast()
    var token
    apiready = function() {
        var info = $api.getStorage('data');
        token = JSON.parse(info).data.access_token;
        getApplyDe(api.pageParam.ID, token);
    };

    function getApplyDe(id, token) {
        var headers = {
            "Authorization": "Bearer " + token
        };
        $http.fnReuestData(UrlRouter.submitApplyDe + id, headers, 'get', '', function(ret, err) {
            if (ret.code === 0) {
                $apis.html(wordOrder_details, '#template', ret.data);
                toast.hide();
            } else {
                toast.hide();
            }
        })
    }
    // 上传图片的高度
    function setUpHeight(that) {
        that.style.width = that.offsetWidth + 'px'
        that.style.height = that.offsetWidth + 'px'
    }
    //  上传图浏览
    function browseImg(data, i) {
        var imageBrowser = api.require('imageBrowser');
        imageBrowser.openImages({
            imageUrls: data.split(','),
            activeIndex: i,
            showList: false
        });
    }
    // 上传文件在线浏览
    function browseFile(paths, flag) {
        api.download({
            url: paths,
            report: true,
            cache: true,
            allowResume: true
        }, function(ret, err) {
            if (ret.state == 1) {
                if (!flag) {
                    var superFile = api.require('superFile');
                    superFile.open({
                        path: ret.savePath
                    });
                }
                setTimeout(function() {
                    api.toast({
                        msg: '下载成功',
                        duration: 2000,
                        location: 'top'
                    });
                }, 100)
            } else {

            }
        });
    }

    // 定位初始化
    var spName = '',
        lon = '',
        lat = '';

    function getLonLat(flag) {
        if (flag == 1) {
            api.showProgress({
                title: '提示',
                text: '定位中...',
            });
        }
        var aMap = api.require('aMap');
        aMap.getLocation(function(ret, err) {
            if (ret.status) {
                api.hideProgress();
                lon = ret.lon;
                lat = ret.lat;
                aMap.getNameFromCoords({
                    lon: ret.lon,
                    lat: ret.lat
                }, function(ret, err) {
                    if (ret.status) {
                        spName = ret.address
                        $apis.html(position_warp, '#mapTemplate', ret);
                    } else {
                        api.toast({
                            msg: '请打开手机定位',
                            duration: 2000,
                            location: 'top'
                        });
                    }
                });
            } else {
                api.hideProgress();
                api.toast({
                    msg: '定位失败请重新定位',
                    duration: 2000,
                    location: 'top'
                });
            }
        });
        return '';
    }

    function uploadImg(type, that) {
        if (type == 'remote') {
            api.getPicture({
                sourceType: 'camera',
                mediaValue: 'pic',
                saveToPhotoAlbum: false
            }, function(ret, err) {
                if (ret && ret.data != '') {
                    uploadHead(ret.data, that);
                } else {
                    alert(JSON.stringify(err));
                }
            });
        }
    }
    // upload img
    function uploadHead(imgUrl, that) {
        $http.fileUploadRequest(UrlRouter.up_images, 'post', {
                image: imgUrl
            })
            .then(ret => {
                if (ret.code == 0) {
                    var html = `<div class="img-item file-width" img-Url="${ret.data.path}">
                          <img src="${ret.data.path}" alt="">
                        </div>`;
                    $api.append(that.parentNode, html);
                    api.toast({
                        msg: '上传成功',
                        duration: 2000,
                        location: 'top'
                    });
                } else {
                    api.toast({
                        msg: '上传失败',
                        duration: 2000,
                        location: 'top'
                    });
                }
            })
            .catch(err => {
                api.toast({
                    msg: '网络错误',
                    duration: 2000,
                    location: 'top'
                });
            })
    }
    // 获取相册图片路径
    function changeImageUrl(el) {
        UIAlbumBrowser.imagePicker({
            max: 9,
            styles: {
                bg: '#000000',
                //cameraImg: 'widget://res/cameraImg.png',
                mark: {
                    position: 'top_right',
                    size: 20
                },
                nav: {
                    bg: '#000000',
                    cancelColor: '#fff',
                    cancelSize: 16,
                    nextStepColor: '#7fff00',
                    nextStepSize: 16
                },
                thumbnail: {
                    w: 100,
                    h: 100
                }
            },
            animation: true,
        }, function(ret) {
            if (ret.eventType == 'nextStep') {
                UIAlbumBrowser.closePicker();
                if (ret.list && ret.list.length > 0) {
                    imgarr = ret.list;
                    // 转换缩略图路径 ios
                    UIAlbumBrowser_transPath(el);
                }
            }
            if (ret.originalPath && ret.originalPath.length > 0) {
                uploadHead(ret.originalPath, el)
            }
        });
    }
    // 转换缩略图路径 ios
    function UIAlbumBrowser_transPath(el) {
        UIAlbumBrowser.transPath({
            path: imgarr[i].path
        }, function(ret, err) {
            if (ret) {
                i++;
                if (i < imgarr.length) {
                    UIAlbumBrowser_transPath(el);
                } else {
                    i = 0;
                }
                uploadHead(ret.path, el)
            }
        });
    }
    // 备注地理位置
    function addPositionNotes() {
        var headers = {
            "Authorization": "Bearer " + token
        };
        var photoFile = $('.photoFile'),
            photoArray = [],
            inputObj = {};
        photoFile.each(function() {
            inputObj = {};
            photoArray = [];
            var photoList = $(this).find('.img-item');
            photoList.each(function() {
                photoArray.push($(this).attr('img-Url'));
            });
            inputObj.inputValue = photoArray.join(',');
        });
        const query = {
            address: spName,
            longitude: lon,
            latitude: lat,
            remark_info: {
                remarkInfo: $api.val($api.byId('remark_information')),
                imageList: photoArray
            }
        }
        $http.fnReuestData(UrlRouter.fill_order + api.pageParam.ID, headers, 'post', query, function(ret, err) {
            if (ret.code === 0) {
                toast.hide();
                getApplyDe(api.pageParam.ID, token);
            } else {
                api.toast({
                    msg: ret.message,
                    duration: 2000,
                    location: 'bottom'
                });

                toast.hide();
            }
        })
    }
    // textarea根据文字多少自适应高度
    function Oninput(that) {
        $(that).height(that.scrollHeight);
    }

    // 打开地图
    function openMaps(lon, lat) {
        $event.openTabLayout('map', '../browseQrcode/map', '', {
            lon: lon,
            lat: lat
        })
    }


    // 图片浏览
    function browseImgTwo(i, value) {
        var imageBrowser = api.require('imageBrowser');
        imageBrowser.openImages({
            imageUrls: value.split(','),
            activeIndex: i,
            showList: false
        });
    }
</script>

</html>
