<template>
  <!--<div class="app-botton" @click="back()">-->
  <!--返回<span class="glyphicon glyphicon-menu-right"></span>-->
  <!--</div>-->
  <div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
    <div class="col-sm-12 col-xs-12">
      <ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
        <li v-for="row in tabs" @click="tabSelect(row, $index)" :class="{ active1: row.complete === componentName }"
            v-if="$index < number + 1 && $index < faultshow.number">
          <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun"
             :class="row.class">
            <span class="spanboder">{{ row.header }}</span>
            <img class="butt2" :src="imgback(row.complete === componentName, row.header === header)"></a>
          <p></p>
        </li>
        <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
          <route name='repair' :reuse="false"></route>
        </div>
        <li v-for="row in tabs" @click="tabSelect(row, $index)" :class="{ active1: row.complete === componentName }"
            v-if="$index > number && $index < faultshow.number">
          <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun"
             :class="row.class">
            <span class="spanboder">{{ row.header }}</span>
            <img class="butt2" :src="imgback(row.complete === componentName, row.header === header)"></a>
          <p></p>
        </li>
        <div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled">
          <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
            <div class="bq-parent">
              <blockquote class="blockquote">
                <p>安检上传</p>
              </blockquote>
            </div>
            <div class="panel panel-default auto repair-info-content">
              <div class="panel-body ">
                <div class="row auto">
                  <!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
                  <!--<label>请输入超期原因:</label><br/>-->
                  <!--<textarea style="width: 100%;" v-model=""></textarea>-->
                  <!--</div>-->
                  <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
                    <div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage == 'CurrentCreate'">
                      <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
                        临时保存
                      </button>
                    </div>
                    <div class="col-xs-3 col-sm-3 col-md-3">
                      <button class="col-sm-3 btn btn-primary" @click="save('finish')">
                        本地缓存
                      </button>
                    </div>
                    <div class="col-xs-3 col-sm-3 col-md-3">
                      <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
                        上传
                      </button>
                    </div>
                    <div v-if="show_torepair">
                      <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
                        转维修
                      </button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </ul>
    </div>
    <modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
      <div slot="modal-header" class="modal-header upuserinfo_sel">
        <h4 class="modal-title">
          转维修
        </h4>
      </div>
      <div slot="modal-body" class="modal-body">
        <div v-for="(index,row) in repairDefect.data" :key="index"
             style="padding: 10px;background-color: #f0f0f0;border: 1px solid #333;border-radius: 10px;">
          <div class="row">
            <span>{{ row.f_defect_name }}</span>
          </div>
          <div class="row" style="margin-top: 10px">
            <label class="font_normal_body">派发类型</label>
            <v-select :value.sync="row.f_repair_data.dispatchType" :value-single="true"
                      v-model="row.f_repair_data.dispatchType" :options='dispatchTypeOptions' placeholder='派发类型'
                      close-on-select>
            </v-select>
          </div>
          <div class="row" style="margin-top: 10px" v-if="row.f_repair_data.dispatchType == '派发给维修员'">
            <label class="font_normal_body">维&ensp;修&ensp;员</label>
            <v-select :value.sync="row.f_repair_data.f_repairman" :value-single="true" :options='repairers'
                      placeholder='请选择' close-on-select></v-select>
          </div>
          <div class="row" style="margin-top: 10px" v-if="row.f_repair_data.dispatchType == '派发给站点'">
            <label class="font_normal_body">站&ensp;&ensp;&ensp;&ensp;点</label>
            <v-select :value-single="true" :value.sync="row.f_repair_data.selectedStation" @change="selectclick(row)"
                      :options='childrenOptions' placeholder='请选择' close-on-select></v-select>
          </div>
          <div class="row" style="margin-top: 10px">
            <label class="font_normal_body">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
            <div class="btn-group" style="width:60%">
              <textarea style="width:100%;height: 100px" v-model="row.f_repair_data.f_remarks"></textarea>
            </div>
          </div>
        </div>
      </div>
      <div slot="modal-footer" class="modal-footer" style="text-align: center">
        <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
        <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
      </div>
    </modal>
  </div>
</template>

<script>
// 户内维修
import Vue from 'vue'
import * as Util from '../../Util'
// import DoorService from './DoorService'
// import Pipeline from './Pipeline'
// import DeviceService from './DeviceService'
// import TroubleRemoval from './TroubleRemoval'
// import FirstGasCheck from './FirstGasCheck'
// import RepairMatterInfo from './RepairMatterInfo'
// import TelChangeMatter from './TelChangeMatter'
import { HttpResetClass } from 'vue-client'
import co from 'co'
import $ from "jquery";
import * as ldapHelper from 'safecheck-client/src/utils/LdapHelper'
let loadParamGem = async function (self) {
  await self.$LoadParams.loadParam()
}

export default {
  title: '安检单',
  props: ['f_plan_id', 'item', 'role', 'parentPage', 'source'],
  // props: ['f_plan_id', 'role'],
  data() {
    return {
      //测试数据
      // f_plan_id:'',
      // role:'inspect',
      // item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
      //   "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
      //   "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
      //   "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
      //   "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
      //   "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
      //   "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
      //   "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
      //   "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
      //   "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
      //   "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
      //   "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
      // },
      childrenOptions: [],
      data: {
        f_devices: [],
        f_defect_content: '',
        f_recording1_path: ''
      },
      imgsnum: this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量') : 1, // 安检整体照片默认必须拍1张
      updateuserphone: false, //安检时是否更新用户电话
      updatemetermodel: false, //安检时是否更新表型号
      updatemeternumber: false, //安检时是否更新表号
      beforephone: '',
      isUpload: false,
      bumen: [],
      show_torepair: false,
      onlySave: true, //判断保存还是保存并上传
      livedispose: '',
      refuseinspection: '', // 拒捡拍照是否提示
      notencountered: '',  // 到访不遇拍照是否提示
      startClick: false, //开始安检按钮是否可点击
      isStrat: false, //是否开始安检
      checkResult: {},//查询结果
      newcheckResult: {},
      repairDefect: {
        result: '正常',
        data: []
      },
      rowCodata: {},
      repairers: [],
      timer: null,
      showModal: false,
      showModal2: false,
      pic_to_be_viewed: '',
      showBack: true,
      devices: [],
      f_devices: [],
      isToRepair: false,
      clickBack: true, //是否点击返回按钮
      isSafeCheckToRepair: false,//是否转维修
      Url: this.$androidUtil.getProxyUrl(),
      detail: {},
      defectDevice: {},
      user: {},
      is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
      dispatchTypeOptions: [{ label: '派发给维修员', value: '派发给维修员' }, { label: '派发给站点', value: '派发给站点' }],
      selectData: {
        dispatchType: '派发给维修员',
        f_repairman: '',
        f_remarks: '',
        f_repairtype: '整改'
      },
      model: {  //转维修数据
        // 一次派单
        serviceacitivity: [{
          f_service_acitivity_type: '派单'
        }],
        f_source: '安检',
        f_service_id: '',
        f_contact_phone: '',
        f_meetunit: '',
        f_phone: '',
        f_user_name: '',
        f_address: '',
        f_repair_date: Util.toStandardTimeString(),
        f_card_id: '',
        // f_department: '', 站点选择
        f_reciever: '',
        f_remarks: '',
        f_user_type: '',
        f_area: '',
        f_unit_name: '',
        f_street: '',
        f_residential_area: '',
        f_building: '',
        f_unit: '',
        f_floor: '',
        f_room: '',
        aState: null,
        f_repairtype: '',
        f_repairitems: {},
      },
      repairitems: [],
      meading: '转站点',
      config: {
        "燃气表": {
          "checkmust": true,
          "index": 1,
          "items": {
            //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
            "基表编号": { "index": 1, "type": "string", "readonly": true },
            "表具类型": { "index": 2, "type": "string", "readonly": true },
            "气表型号": { "index": 3, "type": "string", "readonly": true },
            "气表品牌": { "index": 4, "type": "string", "readonly": true },
            "进气方向": { "index": 5, "type": "string", "readonly": true },
            "初始表底": { "index": 6, "type": "number", "isshow": false, "readonly": true },
            "上期表读数": { "index": 7, "type": "number", "readonly": true, isshow: false },
            "累购气量": { "index": 8, "type": "number", "readonly": true },
            "累购金额": { "index": 8, "type": "number", "readonly": true },
            "已用气量": { "index": 9, "type": "number", "checkmust": true },//基表数
            "已用金额": { "index": 9, "type": "number", "checkmust": false },
            "机械读数": { "index": 10, "type": "number", "checkmust": true },
            "电子读数": { "index": 12, "type": "number", "checkmust": false },
            "剩余气量": { "index": 11, "type": "number", "checkmust": false },//累购-已用
            //显示屏数  --实际剩余气量
            "剩余金额": { "index": 11, "type": "number", "checkmust": false },
            "计量误差异常差值": { "index": 13, "type": "number", "checkmust": false },
            "气量异常差值": { "index": 14, "type": "number", "readonly": true },
            "金额异常差值": { "index": 14, "type": "number", "readonly": true },
            "表箱号": { "index": 15, "type": "string", "readonly": true },
            "燃气表照片": { "index": 16, "type": "picture", "checkmust": false },
          }
          // 注意，配置项的index必须与上面的固定配置保持'顺序'
        },
        // "燃气表2":{
        //   "checkmust":true,
        //   "index":2,src
        //   "items":{
        //     "燃气表照片":{"index":1,"type":"picture"},
        //     "表品牌":{"index":2,"type":"string","readonly":true},
        //     "表号":{"index":3,"type":"string","readonly":true},
        //     "表封号":{"index":4,"type":"number","readonly":true},
        //     "表型号":{"index":5,"type":"string","readonly":true},
        //     "位置":{"index":6,"type":"string","readonly":true},
        //     "表底数":{"index":7,"type":"number","readonly":true},
        //     "累购气量":{"index":8,"type":"number","readonly":true},
        //     "累购金额":{"index":8,"type":"number","readonly":true}
        //   }
        // }
      },
      // 维修项
      isneedDate: '',
      routeShow: true,
      number: 0,
      shupingshow: false,
      pipeline: {},
      details: [],
      ids: '',
      repairData: [],
      savevalid: {
        uservalid: false,
        doorvalid: true,
        changetable: false
      },
      doordetails: {},
      devicedetails: {},
      cookdetails: {},
      componentName: 'safecheck-userinfo',
      header: '客户信息',
      tabs: [
        // 参数全部设置成空，在ready时，等model处理好了，再添加
        {
          header: '客户信息', complete: 'safecheck-userinfo', class: 'repair-info-class', props: null
        },
        {
          header: '拍照签名', complete: 'paper-feedback', class: 'outlay-class', props: null
        }
      ],
      faultshow: {
        number: 8
      }     // 控制 故障汇总 在 菜单里显示与否,
    }
  },
  computed: {
    actionEnabled: {
      get() {
        return this.role == 'inspect'
      }
    }
  },
  methods: {
    showmod() {
      this.initChildrenOptions()
      let errString = this.errorVerify()
      if (errString) {
        console.log(errString)
        console.log('Vue.android', Vue.android)
        console.log('this.isUpload', this.isUpload)
        if (Vue.android) {
          this.$showMessage(errString)
        }
        return
      }
      //清空转维修列表重新进行数据组织
      this.repairDefect = {
        result: '正常',
        data: []
      }
      this.data.f_complete = '已完成'
      this.$set('data.f_offsite_time', Util.toStandardTimeString())
      this.assemblyCodata()
      if (this.repairDefect.result == '正常') {
        this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
        return
      }
      console.log("准备保存！")
      this.disableTimer()
      this.getEmp()
      this.showModal2 = true
    },
    initChildrenOptions() {
      let data = {
        source: 'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
        userid: `${Vue.user.id}`
      }
      let http = new HttpResetClass()
      let ret = http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, data, { resolveMsg: null, rejectMsg: null })
        .then(ret => {
          ret.data[0].children[0].children.forEach((item) => {
            this.bumen.push(item)
          })
          ldapHelper.procParent(this.bumen)
          this.getOptions()
        })
    },
    getOptions() {
      this.toList(this.bumen)
    },
    toList(val) {
      for (let value of val) {
        this.minNodeList(value)
      }
    },
    minNodeList(val) {
      val.children.length > 0 ? this.toList(val.children) : this.childrenOptions.push({ label: val.name, value: val })
    },
    cancel1() {
      this.showModal2 = false
      this.selectData = {
        dispatchType: '派发给维修员',
        f_repairman: '',
        f_remarks: '',
        f_repairtype: '整改'
      }
    },
    getSiteRes(obj) {
      console.log('siteRes ---> ')
      console.log(obj)
      if (obj.resids[0]) {
        this.selectData.f_meetunit = obj.res.join('.')
        this.selectData.f_reciever = obj.resids.join('.')
        this.selectData.f_outlets = obj.res[obj.res.length - 1]
      } else {
        this.selectData.f_meetunit = ''
        this.selectData.f_reciever = ''
        this.selectData.f_outlets = ''
      }
    },
    rectification() {
      this.repairData = []
      for (let i = 0; i < this.repairDefect.data.length; i++) {
        if (this.repairDefect.data[i].f_repair_data.dispatchType == '派发给站点') {
          if (!this.repairDefect.data[i].f_repair_data.f_reciever) {
            this.$showMessage('请选择部门！')
            return
          }
          this.repairData.push({
            toRepair: null,
            activity: { f_meetunit: this.repairDefect.data[i].f_repair_data.f_meetunit, f_reciever: this.repairDefect.data[i].f_repair_data.f_reciever, f_service_acitivity_type: '派单' },
            deps: Vue.user.deps,
            depids: Vue.user.depids,
            f_remarks: this.repairDefect.data[i].f_repair_data.f_remarks,
            f_repairtype: '整改',
            defectIdStr: `('${this.repairDefect.data[i].f_item_name}')`,
            f_attendant: Vue.user.name,
            loginUser: { name: Vue.user.name, ename: Vue.user.id, id: Vue.user.id },
          })
        } else {
          if (!this.repairDefect.data[i].f_repair_data.f_repairman) {
            this.$showMessage('请选择维修员！')
            return
          }
          this.repairData.push({
            toRepair: '一級派单',
            activity: { f_meetunit: '', f_reciever: this.repairDefect.data[i].f_repair_data.f_repairman, f_service_acitivity_type: '派单' },
            deps: Vue.user.deps,
            depids: Vue.user.depids,
            f_remarks: this.repairDefect.data[i].f_repair_data.f_remarks,
            f_repairtype: '整改',
            defectIdStr: `('${this.repairDefect.data[i].f_item_name}')`,
            f_attendant: Vue.user.name,
            loginUser: { name: Vue.user.name, ename: Vue.user.id, id: Vue.user.id },
          })
        }
      }
      this.closely(false)
      console.log('转维修数据组' + this.repairData)
      this.rowCodata.istoRepair = '转维修'
      this.rowCodata.repData = null
      this.rowCodata.repairData = this.repairData
      this.onlySave = false
      this.save()
      this.showModal2 = false
    },
    // 获取维修员
    getEmp() {
      this.repairers = []
      let per = { source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}` }
      let http = new HttpResetClass()
      http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, { data: per }, { resolveMsg: null, rejectMsg: null }).then((res) => {
        res.data.forEach((user) => {
          this.repairers.push({ label: user.name, value: user.name })
        })
      })
    },
    closely(isdelete) {
      try {
        var startOrStopAudioClipStr;
        if (isdelete === true) {
          //tag
          startOrStopAudioClipStr = HostApp.startOrStopAudioClip("----", '停止并删除录音') //停止并删除录音
        } else {
          //tag
          startOrStopAudioClipStr = HostApp.startOrStopAudioClip("----", '停止录音') //停止录音
        }
        if (startOrStopAudioClipStr.code == 200) {
          //tag
          return true;
        } else {
          return false;
        }
      } catch (e) {
        console.error("关闭录音方法异常")
        console.error(e)
        return false;
      }
    },
    // 录音方法
    record() {
      //tag
      if (this.role != 'inspect') {
        if (this.data.f_recording1_path != '') {
          window.location = "/rs/file" + this.data.f_recording1_path
        }
      } else {
        //tag
        let fileName
        if (!this.data.f_recording1_path) {
          fileName = Util.guid() + '.amr'
        } else {
          fileName = Util.getFileName(this.data.f_recording1_path)
        }
        //HostApp.__this__ = this
        /*调用无限制录音模块*/
        let startOrStopState = HostApp.startOrStopAudioClip(fileName, "开始录音")
        //tag
        if (startOrStopState.code == 200) {
          this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
          //tag
          return true;
        } else {
          return false;
        }
      }
    },
    saveNoclick() {
      // 禁用点击事件
      $("#savebut").addClass("noclickbut");
      //tag

      // 5秒后启用点击事件
      setTimeout(function () {
        $("#savebut").removeClass("noclickbut");
      }, 5000);
    },
    timeSet(val) {
      if (!val) {
        return
      }
      let time = new Date(val).getTime()
      let time2 = new Date().getTime()
      if (time2 > time) {
        return true
      }
    },
    imgback(val, isheader) {
      if (val && this.routeShow && isheader) {
        return require('../../../assets/xiangxia1.png')
      } else {
        return require('../../../assets/xiangyou1.png')
      }
    },
    changediv(val) {
      //tag
      return val
    },
    // 选择tab
    tabSelect(item, number) {
      this.header = item.header
      //tag
      //tag
      //tag
      //tag
      // 处理关闭/显示 内容
      if (this.number == number && !this.routeShow) {
        this.routeShow = true
      } else if (this.number == number && this.routeShow) {
        this.routeShow = false
      } else if (this.number != item.complete) {
        this.routeShow = true
      }
      this.number = number
      this.componentName = item.complete
      //tag
      if (item.complete == 'safecheck-devices') {
        //tag
        if (item.header != '燃气表' && this.data['device' + item.number].length == 0) {
          this.data['device' + item.number].push({})
        }
        //tag
        //tag)
        let idx = this.data['device' + item.number].length - 1
        let itemprops = {
          config: this.config,
          device: this.devices[item.number - 1],
          idx: idx,
          role: 'inspect'
        }
        //tag
        //tag)
        //tag)
        //tag
        if (this.routeShow) {
          this.$goto(item.complete, itemprops, 'repair')
          //tag
        }
      } else {
        //tag
        if (this.routeShow) {
          this.$goto(item.complete, { userinfo: this.data }, 'repair')
        }
      }
      this.shupingshow = true
    },
    // 给组件添加参数
    getImgPath() {
      for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
        this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
      }
      this.ids = this.ids.substring(0, this.ids.length - 1)
      if (this.ids) {
        this.getImgGen();
      }
    },
    getImgGen() {
      let http = new HttpResetClass()
      http.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
        data: {
          items: '*',
          tablename: 't_files',
          condition: `id in (${this.ids})`,
          orderitem: 'id'
        }
      }, { resolveMsg: null, rejectMsg: null }).then((res) => {
        for (let i = 0; i < res.data.length; i++) {
          for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
            //tag)
            //tag
            if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
              this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
            }
          }

        }
      })
    },

    sortDetails() {
      for (let i = 0; i < this.details.length; i++) {
        if (this.details[i].details.length) {
          for (let j = 0; j < this.details[i].details.length; j++) {
            if (this.details[i].details[j].f_type === 'a') {
              this.doordetails = { details: this.details[i].details }
              break
            }
            if (this.details[i].details[j].f_type === 'b') {
              this.devicedetails = { details: this.details[i].details }
              break
            }
            if (this.details[i].details[j].f_type === 'c') {
              this.cookdetails = { details: this.details[i].details }
              break
            }
          }
        }
      }
    },
    // 复制数据
    back() {
      let _this = this
      if (this.issee) {
        _this.$back()
        return
      }
      this.$showMessage('所填写内容将不可恢复！', ['confirm', 'cancel']).then((res) => {
        if (res === 'confirm') {
          this.closely()
          _this.$back()
        }
      })
    },
    confirm() {
      this.$dispatch('confirm')
    },
    tick() {
      this.timer = null
      this.data.f_offsite_time = Util.toStandardTimeString()
      this.timer = window.setTimeout(this.tick, 1000)
    },
    getRepairState() {
      let repaired = true
      this.data.f_defects.forEach((defect) => {
        repaired = repaired & (defect.f_ratification == '已处理')
      })
      return repaired
    },
    verifyRepairDefects() {
      this.data.f_repair_date = Util.toStandardTimeString()
      this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
    },
    errorVerify() {
      let hasError = this.verifyState()
      if (hasError)
        return hasError

      if (this.data.f_entry_status != '入户')
        return null
      hasError = this.verifyUser()
      if (hasError)
        return hasError
      hasError = this.verifyDevices()
      if (hasError)
        return hasError
      hasError = this.verifyFeedback2()
      if (hasError)
        return hasError
    },
    verifyState() {
      if (Vue.android && this.data.f_entry_status == '未使用天然气' && this.data.f_nongasuser_path == Vue.nopic)
        return '未使用天然气则必须拍照'
      if (Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
        return '到访不遇必须拍照'
      if (Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
        return '拒捡必须拍照'
    },
    verifyUser() {
      //tag
      //tag
      //tag)
      let prefix = '用户基本信息：'
      if (Util.required(this.data.f_user_name))
        return prefix + '用户名必须输入'
      if (!(/^\d{11}$/.test(this.data.f_user_phone))) {

        return '请输入正确的电话号码'
      }
      // if(Util.required(this.data.f_residential_area))
      //   return prefix + '小区名称必须输入'
      // if (Util.required(this.data.f_address))
      //   return prefix + '地址必须输入'
    },
    verifyDevices() {
      for (let dev in this.config) {
        if (this.config[dev].checkmust == true) {
          let error = true
          for (let device in this.data) {
            if (device.startsWith("device")) {
              for (let item in this.data[device]) {
                if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
                  error = false
                }
              }
            }
          }
          if (error) {
            return "请检查" + dev
          }
        }
      }

      for (let dev in this.config) {
        for (let device in this.data) {
          if (device.startsWith("device")) {
            for (let item in this.data[device]) {
              //检查每一条安检结果
              if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
                for (let i in this.data[device][item].f_items) {
                  for (let it in this.config[dev].items) {
                    if (it == this.data[device][item].f_items[i].f_item_name) {
                      let check = false
                      if (!this.data[device][item].f_items[i].f_item_value) {
                        check = true
                      } else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)) {
                        if (this.data[device][item].f_items[i].f_item_value.length == 0) {
                          check = true
                        }
                      }

                      if (this.config[dev].items[it].type == 'picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path) {
                        return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
                      }
                      if (this.config[dev].items[it].type != 'picture' && this.config[dev].items[it].checkmust == true && check) {
                        return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
                      }
                    }
                  }
                  //检查安检下拉结果
                  if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
                    if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
                      return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    verifyFeedback2() {
      let prefix = '拍照签名：'
      if (Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
        return prefix + `必须有${this.imgsnum}安检总体照片`
      if (Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
        return prefix + '必须有用户签名'
    },
    verifyFeedback() {
      let prefix = '拍照签名：'
      //tag)
      if (Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
        return prefix + `必须有${this.imgsnum}安检总体照片`
      if (Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
        return prefix + '必须有用户签名'
      if (Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
        return prefix + '下发安检通知书则必须给通知书拍照'
      if (Vue.android && this.data.f_blacklist && this.data.f_blocking_cause == '')
        return prefix + '请填写拉黑原因'
      if (!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
        return prefix + '请选择服务评价'
    },
    getAllDefect() {
      let checkResults = {
        result: '正常',
        data: []
      }
      let value = ''
      let codata = JSON.parse(JSON.stringify(this.data))
      //tag)
      //tag)
      codata.f_devices = []
      this.f_devices = []
      for (let device in codata) {
        let f_device_type
        if (device.startsWith("device")) {
          //tag)
          let hasOther = ''
          let otherValue = null
          for (let item in codata[device]) {
            if (typeof codata[device][item] == 'function') {
              continue
            }
            codata[device][item].f_create_time = Util.toStandardTimeString()
            if (codata[device].length > 1) {
              let j = Number.parseInt(item) + 1
              f_device_type = `${codata[device][item].f_device_type}${j}`
            } else {
              f_device_type = codata[device][item].f_device_type
            }
            //tag
            //tag
            //tag)
            //tag)
            if (item == 'sum' || item == 'removeEmpty') {
              continue
            }
            for (let i = 0; i < codata[device][item].f_items.length; i++) {
              //tag
              if (i == 'sum' || i == 'removeEmpty') {
                continue
              }
              //tag)
              var items = codata[device][item].f_items[i]
              items.f_create_time = Util.toStandardTimeString()
              //tag)
              items.f_item_lists = []
              //tag)
              // //tag)
              // //tag} name => ${JSON.stringify(items.f_item_name)} value => ${JSON.stringify(items.f_item_value)}`)
              // console.log(`f_is_defect => ${this.config[codata[device][item]
              //     .f_device_type]
              //     .items[items.f_item_name]
              //     .options
              //     .find((option)=>option.data === items.f_item_value)
              //     .map((option)=>option.f_is_defect)}`)
              // if (items.f_is_defect && (items.f_is_defect == true || items.f_is_defect == 'true')) {
              //     //tag
              //     checkResults.result = '有隐患'
              //     //tag)
              //     //tag)
              //     // this.$set('checkResult.' + items.f_item_name, items.f_item_value)
              //       this.checkResult[items.f_item_name] = items.f_item_value
              //     //tag)
              //     // this.$set('checkResultsss.' + items.f_item_name, `${f_device_type}${items.f_item_value}`)
              //     // //tag)
              // }
              if (items.type == 'selector') {
                items.selected = []
              } else if (items.type == 'inputSelector') {
                items.selected = ''
              }
              //遍历配置项 将所选隐患项的配置信息放入保存的数据中
              let f_is_defect   //是否是隐患
              let f_defect_level   //是否是隐患
              let f_item_name = items.f_item_name
              let f_item_value
              let f_is_eliminate //隐患是否消除
              let f_meternumber = ''
              let f_user_defects = [] // 用户所有隐患
              //tag
              //tag
              if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
                for (let i in items.f_item_value) {
                  if (typeof items.f_item_value[i] == 'function') {
                    continue
                  }
                  let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
                  //tag)
                  for (let k in configItems.options) {
                    if (typeof configItems.options[k] == 'function') {
                      continue
                    }
                    //tag)
                    if (items.f_item_value[i] === configItems.options[k].data) {

                      f_is_defect = configItems.options[k].isdefect
                      f_item_value = items.f_item_value[i]
                      f_defect_level = configItems.options[k].level

                      //tag
                      //tag
                      //tag

                      if (f_is_defect) {
                        if (checkResults.result !== '有隐患') {
                          checkResults.result = '有隐患'
                        }
                        console.log('items' + items)
                        if (items.f_deal_dispose == '报修') {
                          console.log("检测到需要转维修++++++++++++")
                          this.repairDefect.result = '未处理'
                          let f_repair_data = {}
                          if (items.dispatchType == '派发给维修员'){
                            f_repair_data = {
                              dispatchType:'派发给维修员',
                              f_repairman: items.f_repairman
                            }
                          }else if (items.dispatchType == '派发给站点'){
                            f_repair_data = {
                              dispatchType:'派发给站点',
                              f_meetunit: items.f_meetunit,
                              f_outlets: items.f_meetunit,
                              f_reciever: items.f_reciever
                            }
                          }
                          this.repairDefect.data.push(
                            {
                              f_defect_name: `${f_item_name} : ${f_item_value}`,
                              f_repair_data: f_repair_data,
                              f_item_name: f_item_name
                            })
                        }
                        if (!this.checkResult.hasOwnProperty(f_device_type + '-' + f_item_name)) {
                          //tag
                          this.checkResult[f_device_type + '-' + f_item_name] = []
                        }

                        //tag
                        this.checkResult[f_device_type + '-' + f_item_name].push(f_item_value)

                      }

                      let items_list = {
                        f_is_defect: f_is_defect,
                        f_item_value: f_item_value,
                        f_defect_level: f_defect_level,
                        f_is_eliminate: null,
                        f_create_time: Util.toStandardTimeString()
                      }
                      if (!items.f_item_lists) {
                        //tag
                        items.f_item_lists = []
                        //tag)
                        if (JSON.stringify(items_list) !== '{}') {
                          //tag
                          items.f_item_lists.push(items_list)
                        }
                      } else {
                        //tag)
                        if (JSON.stringify(items_list) !== '{}') {
                          //tag
                          items.f_item_lists.push(items_list)
                        }
                      }
                    }
                  }
                }
              } else {
                let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
                f_is_defect = items.f_is_defect
                f_defect_level = items.level
                f_item_value = items.f_item_value
                let items_list = {
                  f_is_defect: f_is_defect,
                  f_item_value: f_item_value,
                  f_defect_level: f_defect_level,
                  f_create_time: Util.toStandardTimeString()
                }
                if (f_is_defect && f_item_value) {
                  items.f_is_defect = true
                  if (checkResults.result !== '有隐患') {
                    checkResults.result = '有隐患'
                  }
                  if(items.f_item_name=='金额异常差值' ||items.f_item_name=='气量异常差值'){
                    let num=this.$appdata.getSingleValue(`${items.f_item_name}允许误差`)
                    if(Math.abs(f_item_value) > Number(num)){
                      if (items.f_deal_dispose == '报修') {
                        console.log("检测到需要转维修++++++++++++")
                        this.repairDefect.result = '未处理'
                        let f_repair_data  = {
                          dispatchType:'派发给维修员',
                          f_repairman: '数据审核员'
                        }
                        this.repairDefect.data.push(
                          {
                            f_defect_name: `${f_item_name} : ${f_item_value}`,
                            f_repair_data: f_repair_data,
                            f_item_name: f_item_name
                          })
                      }
                    }
                  }
                  if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
                    //tag
                    this.checkResult[items.f_item_name] = []
                  }

                  //tag
                  this.checkResult[items.f_item_name].push(f_item_value)

                }
                //tag)
                //tag)
                if (!items.f_item_lists) {
                  //tag
                  items.f_item_lists = []
                  if (JSON.stringify(items_list) != '{}') {
                    //tag
                    items.f_item_lists.push(items_list)
                  }
                } else {
                  // items.f_item_lists[0].f_item_value = f_item_value
                  if (JSON.stringify(items_list) != '{}') {
                    //tag
                    //tag)
                    //tag)
                    //tag
                    items.f_item_lists.push(items_list)
                  }
                }
              }
              if (hasOther !== '' && otherValue !== null) {
                //tag
                this.checkResult[hasOther].push(otherValue)
                hasOther = ''
                otherValue = null
              }
              items.f_item_value = ''
            }
            //tag)
            this.f_devices.push(codata[device][item])
          }
        }
      }
      if (this.checkResult) {
        for (let key in this.checkResult) {
          if (typeof this.checkResult[key] == 'function') {
            continue
          }
          // 上次安检结果数据组织
          //tag
          //tag
          let temp = {}
          temp[key] = this.checkResult[key].join(',')
          checkResults.data.push(temp)
          // this.newcheckResult[key] = this.checkResult[key]
          // checkResults.data.push(this.newcheckResult)
          //tag)
          // this.newcheckResult = {}
        }
        this.checkResult = {}
      }
      if (checkResults.data.length > 0) {
        let msg = ''
        for (let a = 0; a < checkResults.data.length; a++) {
          for (let datumKey in checkResults.data[a]) {
            msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
          }
        }
        this.data.f_defect_text = msg
        codata.f_defect_text = msg
      }
      codata.f_defect_content = JSON.stringify(checkResults)
      this.data.f_defect_content = JSON.stringify(checkResults)
      //tag
      return codata
    },
    uploadCheckPaper() {
      this.saveNoclick()
      this.closely(false) // 保存本地，不删除录音文件停止录音
      let errString = this.errorVerify()
      if (errString) {
        if (Vue.android) {
          this.$showMessage(errString)
        }
        return
      } else {
        this.$set('data.f_offsite_time', Util.toStandardTimeString())
        this.$set('data.f_upload_time', Util.toStandardTimeString())
        this.$set('data.f_upload_date', Util.toStandardTimeString())
        //tag
        this.data.f_complete = '已完成'
        this.disableTimer()
      }
      //tag
      this.onlySave = false
      this.assemblyCodata()
      if (this.repairDefect.result != '正常') {
        return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
      }
      let res = this.save()
      // if(res) {
      //   try {
      //     let codata = this.getAllDefect()
      //     //获取微信推送内容
      //     let WxResult = this.getWeixin(codata)
      //     let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
      //       f_check_item_id: this.data.f_check_item_id
      //     })
      //     //如果是转维修上传，则不做校验，上传完成后自动转维修
      //     //tag
      //     //tag
      //     if(!this.isToRepair){
      //       if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
      //         //tag
      //         //tag
      //         if(!this.isSafeCheckToRepair){
      //           this.$showMessage('有未处理的隐患，请前往拍照上传中将安检转为维修单！')
      //           return
      //         }
      //       }
      //     }
      //     //tag
      //     for (let key in codata){
      //       if(key.startsWith("device")){
      //         codata[key] = []
      //       }
      //     }
      //     //tag}`)
      //
      //     //tag
      //     let isStart = true
      //     let res
      //     for (let i in this.f_devices){
      //       res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
      //       if(res.code == 200){
      //         isStart = false
      //       }else{
      //         this.$showMessage("保存失败!")
      //       }
      //     }
      //     let result = HostApp.organizeJSON({
      //       isStart:false,
      //       isJSON:true,
      //       jsonstr:{
      //         f_check_item_id: this.data.f_check_item_id,
      //         f_checker_id: this.data.f_checker_id,
      //         row: codata
      //       }
      //     })
      //     if(result.code == 200){
      //       HostApp.__this__ = this
      //       this.runSyncLogic('上传安检信息','javascript:HostApp.__this__.uploadCallBack()',1)
      //     }
      //
      //
      //     // let response = this.$androidUtil.bzLogic('上传安检信息', {
      //     //   f_check_item_id: this.data.f_check_item_id,
      //     //   f_checker_id: this.data.f_checker_id,
      //     //   row: codata
      //     // })
      //     // if (response.code == 200) {
      //     //   //tag
      //     //   //tag)
      //     //   let f_paper_id
      //     //   if(response.data != '' && response.data != null){
      //     //     f_paper_id = JSON.parse(response.data).id
      //     //   }
      //     //   this.$set('data.f_paper_id', f_paper_id)
      //     //   //tag
      //     //   //tag)
      //     //   //tag
      //     //   //tag)
      //     //   for (let device in this.data){
      //     //     //tag
      //     //     //tag)
      //     //     if(device.startsWith("device")){
      //     //       for(let devices of this.data[device]) {
      //     //         devices.f_paper_id = f_paper_id
      //     //         let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
      //     //           row: devices
      //     //         })
      //     //         //tag}`)
      //     //         if(ret.code == 200){
      //     //           //tag
      //     //           devices.f_device_id = JSON.parse(ret.data.f_device_id).id
      //     //         }
      //     //         //tag
      //     //         //tag)
      //     //         if (ret.code != 200) {
      //     //           //TODO 失败后处理
      //     //           // this.isUpload = false
      //     //           this.$showMessage("上传失败!")
      //     //           return false
      //     //         }
      //     //       }
      //     //     }
      //     //   }
      //     //   // for (let device of this.f_devices) {
      //     //   //   device.f_paper_id = f_paper_id
      //     //   //   //tag
      //     //   //   //tag)
      //     //   //   let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
      //     //   //     row: device
      //     //   //   })
      //     //   //   //tag
      //     //   //   if (ret.code != 200) {
      //     //   //     //TODO 失败后处理
      //     //   //     HostApp.alert("上传失败!")
      //     //   //     return false
      //     //   //   }
      //     //   // }
      //     //   let result = this.$androidUtil.bzLogic('FinishUpload',
      //     //     {
      //     //       f_check_item_id: this.data.f_check_item_id,
      //     //       f_userinfo_id: codata.f_userinfoid,
      //     //       f_last_check_result: codata.f_defect_content
      //     //     })
      //     //   if(result.code == 200){
      //     //     // this.$showAlert('上传成功!', 'success', 2000)
      //     //     this.$showMessage('上传成功!')
      //     //     this.isStrat=false
      //     //     if(url != "" ){
      //     //       this.$resetpost(`${url}`,{data:WxResult})
      //     //     }
      //     //     return true
      //     //   }else{
      //     //     // this.isUpload = false
      //     //     this.$showMessage("上传失败!")
      //     //     return false
      //     //   }
      //     // }else{
      //     //   // this.isUpload = false
      //     //   this.$showMessage("上传失败!")
      //     //   return false
      //     // }
      //   }catch (e) {
      //     //tag)
      //     // this.isUpload = false
      //     this.$showMessage("上传失败!")
      //   }
      // }
    },
    selectclick(row) {
      if (row) {
        row.f_repair_data.f_meetunit = row.f_repair_data.selectedStation.name
        row.f_repair_data.f_reciever = row.f_repair_data.selectedStation.id
        row.f_repair_data.f_outlets = row.f_repair_data.selectedStation.name
      }
    },
    //将数据组装提出
    assemblyCodata() {
      let codata = this.getAllDefect()
      console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
      console.log(`codata内容-->${JSON.stringify(codata)}`)
      for (let key in codata) {
        if (key.startsWith("device")) {
          console.log('this.data.' + key + JSON.stringify(codata[key]))
          codata[key] = []
        }
      }
      codata.f_devices = this.f_devices
      this.rowCodata = codata
    },
    save(type) {
      if (type == 'temp' || type == 'finish') {
        this.assemblyCodata()
      }
      //禁用事件
      this.saveNoclick()
      //tag
      //tag
      if (type == 'temp') {
        this.data.f_complete = '未完成'
        this.rowCodata.f_complete = '未完成'
        // 关闭录音方法
        this.closely(true) //临时保存，删除录音文件并暂停录音
        this.disableTimer()
      } else {
        // 关闭录音方法
        this.closely(false) // 保存本地，不删除录音文件暂停录音
        let errString = this.errorVerify()
        if (errString) {
          //tag
          //tag
          //tag
          if (Vue.android) {
            this.$showMessage(errString)
          }
          return
        } else {
          this.data.f_complete = '已完成'
          this.rowCodata.f_complete = '已完成'
          this.$set('data.f_offsite_time', Util.toStandardTimeString())
          this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
          this.disableTimer()
        }
      }
      //tag
      if (this.data.f_blacklist != '是') {
        delete this.data.f_blocking_cause
      }
      if (this.data.f_entry_status == '入户') {
        this.data.f_rejectchecks_path = []
        this.data.f_rejectcheck_path = null
        this.data.f_rejectcheck1_path = null
        this.data.f_rejectcheck2_path = null
        this.data.f_noanswers_path = []
        this.data.f_noanswer_path = null
        this.data.f_noanswer1_path = null
        this.data.f_noanswer2_path = null
      } else if (this.data.f_entry_status == '到访不遇') {
        this.data.f_rejectchecks_path = []
        this.data.f_rejectcheck_path = null
        this.data.f_rejectcheck1_path = null
        this.data.f_rejectcheck2_path = null
      } else if (this.data.f_entry_status == '拒检') {
        this.data.f_noanswers_path = []
        this.data.f_noanswer_path = null
        this.data.f_noanswer1_path = null
        this.data.f_noanswer2_path = null
      }
      // try {
      let codata = this.rowCodata
      //tag
      //tag}`)
      for (let key in codata) {
        if (key.startsWith("device")) {
          //tag)
          codata[key] = []
        }
      }
      //tag}`)
      //tag}`)
      //tag
      if (Vue.android) {
        //tag
        let value = this.$androidUtil.path({
          alias: 'getUserinfomation',
          data: { condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')" }
        })
        //tag)
        if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
          // let result = this.$androidUtil.bzLogic('SafeSaveNoPaper', {
          //   f_check_item_id: this.data.f_check_item_id,
          //   f_checker_id: this.data.f_checker_id,
          //   f_upload_state:'未传',
          //   row: codata
          // })
          //tag
          let isStart = true
          // let res
          // for (let i in this.f_devices) {
          //   res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
          //   if (res.code == 200) {
          //     isStart = false
          //   } else {
          //     this.$showMessage("保存失败!")
          //   }
          // }
          // let result = HostApp.organizeJSON({
          //   isStart: false,
          //   isJSON: true,
          //   jsonstr: {
          //     f_check_item_id: this.data.f_check_item_id,
          //     f_checker_id: this.data.f_checker_id,
          //     f_upload_state: '未传',
          //     row: codata
          //   }
          // })
          codata.f_devices = this.f_devices
          if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
            this.rowCodata = Object.assign({}, this.rowCodata, codata)
          } else {
            this.rowCodata = codata
          }
          let param = {
            f_check_item_id: this.data.f_check_item_id,
            f_checker_id: this.data.f_checker_id,
            f_upload_state: '未传',
            // row: codata
            row: this.rowCodata
          }
          //tag)
          let paramStr = JSON.stringify(param)
          // 多长截断一次
          let subLength = 800
          for (let i = 0; i < paramStr.length; i += subLength) {
            HostApp.param_cache(paramStr.substr(i, subLength))
          }
          HostApp.__this__ = this
          HostApp.syncLogic({
            // logic别名，key必须为logic
            'logic': 'SafeSaveNoPaper',
            // 回调执行方法名，key必须为callback
            'callback': 'javascript:HostApp.__this__.saveCallBack()',
            // 固定key，代表是否将logic执行结果作为参数传入回调方法，1代表true，0代表false，
            // 执行回调方法传入key为backresult
            // 如需额外拼接参数，写在logic返回值的params，例如xxlogic返回:{"params": "success"}
            'backresult': 1
          })
        } else {
          // console.log("dddddddd")
          //tag
          let isStart = true
          let res
          //tag)
          // for (let i in this.f_devices) {
          //   //tag)
          //   for (let j = 0; j < this.f_devices[i].f_items.length; j++) {
          //     //tag)
          //   }
          //   res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
          //   //tag)
          //   if (res.code == 200) {
          //     isStart = false
          //   } else {
          //     this.$showMessage("保存失败!")
          //   }
          // }
          //tag)
          //tag)
          //tag)
          // let result = HostApp.organizeJSON({
          //   isStart: false,
          //   isJSON: true,
          //   jsonstr: {
          //     f_check_item_id: this.data.f_check_item_id,
          //     f_checker_id: this.data.f_checker_id,
          //     row: codata
          //   }
          // })
          codata.f_devices = this.f_devices
          if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
            this.rowCodata = Object.assign({}, this.rowCodata, codata)
          } else {
            this.rowCodata = codata
          }
          let param = {
            f_check_item_id: this.data.f_check_item_id,
            f_checker_id: this.data.f_checker_id,
            // row: codata
            row: this.rowCodata
          }
          //tag)
          // console.log("ni"+JSON.stringify(param))
          let paramStr = JSON.stringify(param)
          // 多长截断一次
          let subLength = 800
          for (let i = 0; i < paramStr.length; i += subLength) {
            HostApp.param_cache(paramStr.substr(i, subLength))
          }
          HostApp.__this__ = this
          HostApp.syncLogic({
            // logic别名，key必须为logic
            'logic': '保存安检单信息',
            // 回调执行方法名，key必须为callback
            'callback': 'javascript:HostApp.__this__.saveCallBack()',
            // 固定key，代表是否将logic执行结果作为参数传入回调方法，1代表true，0代表false，
            // 执行回调方法传入key为backresult
            // 如需额外拼接参数，写在logic返回值的params，例如xxlogic返回:{"params": "success"}
            'backresult': 1
          })
        }

      } else {
        //tag
        let value = this.$androidUtil.path({
          alias: 'getUserinfomation',
          data: { condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')" }
        })
        if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
          this.rowCodata = Object.assign({}, this.rowCodata, codata)
        } else {
          this.rowCodata = codata
        }
        if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
          this.$androidUtil.bzLogic('SafeSaveNoPaper', {
            f_check_item_id: this.data.f_check_item_id,
            f_checker_id: this.data.f_checker_id,
            f_upload_state: '未传',
            // row: codata
            row: this.rowCodata
          }).then((res) => {
            if (res.data.code == 200) {
              //保存devices
              this.$androidUtil.bzLogic('getPaperInfo', {
                f_check_item_id: this.data.f_check_item_id
              }).then((res) => {
                //tag
                if (res.data.code == 200) {

                  let f_paper_id = res.data.data[0].id
                  for (let device of this.f_devices) {
                    device.f_paper_id = f_paper_id
                    //tag
                    this.$androidUtil.bzLogic('saveDevice', {
                      row: device
                    }).then((ret) => {
                      //tag
                      if (ret.code != 200) {
                        // if(this.isUpload){
                        //   this.isUpload = false
                        // }
                        //TODO 失败后处理
                        this.$showMessage("保存失败!")
                        return false
                      }
                    })
                  }
                }
              })
              // this.$showAlert('保存成功!', 'success', 2000)
              this.$showMessage('保存成功!')
              return true
            } else {
              // if(this.isUpload){
              //   this.isUpload = false
              // }
              this.$showMessage("保存失败!")
              return false
            }
          })
        }
        else {
          this.$androidUtil.bzLogic('保存安检单信息', {
            f_check_item_id: this.data.f_check_item_id,
            f_checker_id: this.data.f_checker_id,
            row: this.rowCodata
          }).then((res) => {
            //tag
            if (res.data.code == 200) {
              //保存devices
              this.$androidUtil.bzLogic('getPaperInfo', {
                f_check_item_id: this.data.f_check_item_id
              }).then((res) => {
                //tag
                if (res.data.code == 200) {

                  let f_paper_id = res.data.data[0].id
                  for (let device of this.f_devices) {
                    device.f_paper_id = f_paper_id
                    //tag
                    this.$androidUtil.bzLogic('saveDevice', {
                      row: device
                    }).then((ret) => {
                      //tag
                      if (ret.code != 200) {
                        // if(this.isUpload){
                        //   this.isUpload = false
                        // }
                        //TODO 失败后处理
                        this.$showMessage("保存失败!")
                        return false
                      }
                    })
                  }
                }
              })
              // this.$showAlert('保存成功!', 'success', 2000)
              this.$showMessage('保存成功!')
              return true
            } else {
              // if(this.isUpload){
              //   this.isUpload = false
              // }
              this.$showMessage("保存失败!")
              return false
            }
          })
        }
      }
      // }catch (e) {
      //   //tag)
      //   // this.isUpload = false
      //   this.$showMessage("保存失败!")
      // }
    },
    runSyncLogic(logic, callback, backresult) {
      HostApp.runSyncLogic({
        // logic别名，key必须为logic
        'logic': logic,
        // 回调执行方法名，key必须为callback
        'callback': callback,
        // 固定key，代表是否将logic执行结果作为参数传入回调方法，1代表true，0代表false，
        // 执行回调方法传入key为backresult
        // 如需额外拼接参数，写在logic返回值的params，例如xxlogic返回:{"params": "success"}
        'backresult': backresult
      })
    },
    logicWithHint(logic, data, callback, backresult) {
      HostApp.logicWithHint({
        // logic别名，key必须为logic
        'logic': logic,
        // 回调执行方法名，key必须为callback
        'callback': callback,
        // logic执行需要的业务参数
        'data': data,
        // 固定key，代表是否将logic执行结果作为参数传入回调方法，1代表true，0代表false，
        // 执行回调方法传入key为backresult
        // 如需额外拼接参数，写在logic返回值的params，例如xxlogic返回:{"params": "success"}
        'backresult': backresult
      })
    },
    saveCallBack(jo) {
      //tag)
      // console.log("jjjj"+JSON.stringify(jo))
      if (jo.state == 'ok') {
        let res = JSON.parse(jo.result)
        //tag)
        if (res.code == 200) {
          //tag
          if (!this.onlySave) {
            let codata = this.getAllDefect()
            //获取微信推送内容
            // let WxResult = this.getWeixin(codata)
            let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
              f_check_item_id: this.data.f_check_item_id
            })
            //如果是转维修上传，则不做校验，上传完成后自动转维修
            //tag
            //tag
            if (!this.isToRepair) {
              if (haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)) {
                //tag
                //tag
                if (!this.isSafeCheckToRepair) {

                }
              }
            }
            //tag
            for (let key in codata) {
              if (key.startsWith("device")) {
                codata[key] = []
              }
            }
            //tag}`)

            //tag
            // let isStart = true
            // let res
            // for (let i in this.f_devices){
            //   res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
            //   if(res.code == 200){
            //     isStart = false
            //   }else{
            //     this.$showMessage("上传失败!")
            //     return
            //   }
            // }
            // let result = HostApp.organizeJSON({
            //   isStart:false,
            //   isJSON:true,
            //   jsonstr:{
            //     f_check_item_id: this.data.f_check_item_id,
            //     f_checker_id: this.data.f_checker_id,
            //     row: codata
            //   }
            // })
            codata.f_devices = this.f_devices
            if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
              this.rowCodata = Object.assign({}, this.rowCodata, codata)
            } else {
              this.rowCodata = codata
            }
            if (this.rowCodata.f_state = '已检') {
              this.rowCodata.f_no_checkplan = '复检'
            }
            let param = {
              f_check_item_id: this.data.f_check_item_id,
              f_checker_id: this.data.f_checker_id,
              // row: codata
              row: this.rowCodata
            }
            //tag)
            let paramStr = JSON.stringify(param)
            // 多长截断一次
            let subLength = 800
            for (let i = 0; i < paramStr.length; i += subLength) {
              HostApp.param_cache(paramStr.substr(i, subLength))
            }
            HostApp.__this__ = this
            HostApp.syncLogic({
              // logic别名，key必须为logic
              'logic': '上传安检信息',
              // 回调执行方法名，key必须为callback
              'callback': 'javascript:HostApp.__this__.uploadCallBack()',
              // 固定key，代表是否将logic执行结果作为参数传入回调方法，1代表true，0代表false，
              // 执行回调方法传入key为backresult
              // 如需额外拼接参数，写在logic返回值的params，例如xxlogic返回:{"params": "success"}
              'backresult': 1
            })
          } else {
            this.$showMessage('保存成功！')
            if (this.clickBack) {
              this.isStrat = false
              this.$dispatch('confirm')
              //this.$back()
            }
          }
        } else {
          this.$showMessage('保存失败！')
          return
        }
      } else {
        this.$showMessage('服务器内部错误,保存失败！')
        return
      }
    },
    uploadCallBack(jo) {
      //获取微信推送路径
      let url = ""
      if (Vue.config.safecheck != undefined) {
        if (Vue.config.safecheck.ApproveConfig != undefined) {
          if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
            url = Vue.config.safecheck.ApproveConfig.weixinurl
          }
        }
      }
      //tag)
      //tag)
      if (jo.state == 'ok') {
        let res = JSON.parse(jo.result)
        //tag)
        //tag)
        if (res.code == 200) {
          this.$set('data.f_paper_id', res.id)
          this.isStrat = false
          if (url != "") {
            this.$resetpost(`${url}`, { data: WxResult })
          }
          //tag
          if (this.isToRepair) {
            for (let device in this.data) {
              if (device.startsWith("device")) {
                this.data[device] = []
                if (res.data.length > 0) {
                  for (let i in res.data[0].f_devices) {
                    if (this.data[device].length > 0) {
                      if (this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type) {
                        this.data[device].push(res.data[0].f_devices[i])
                        res.data[0].f_devices.splice(i, 1)
                      }
                    } else {
                      this.data[device].push(res.data[0].f_devices[i])
                      res.data[0].f_devices.splice(i, 1)
                    }
                  }
                }
              }
            }
            this.todo()
          } else {
            this.$showMessage('上传成功!')
            //tag
            this.$dispatch('confirm')
            // this.$back()
          }
        } else if (res.code == 309) {
          this.$showMessage('该安检单已作废!')
          //tag
          this.$dispatch('confirm')
        } else if (res.code == 710) {
          let msg = ''
          if (res.msg.includes('f_overall_path')){
            msg = '上传总体安检照片失败,请检查网络是否正常！'
          }else if (res.msg.includes('f_sign_path')){
            msg = '上传签名照片失败,请检查网络是否正常！'
          }else if (res.msg.includes('f_noanswer_path') || res.msg.includes('f_rejectcheck_path')){
            msg = `上传${this.data.f_entry_status}照片失败,请检查网络是否正常！`
          }else {
            msg = '上传照片失败,请检查网络是否正常！' + res.msg
          }
          this.$showMessage(msg)
          return
        } else if (res.code == 711) {
          this.$showMessage('该安检单已被管理员调整，请联系管理员!')
          return
        } else if (res.code == 712) {
          this.$showMessage('网络异常，请重新上传，多次上传失败请联系管理员!')
          return
        }
        else {
          this.$showMessage('上传失败！')
        }
      } else {
        this.$showMessage('网络异常,上传失败！')
      }
      this.onlySave = true
    },
    safecheckToRepairCallBack(jo) {
      //获取微信推送路径
      if (jo.state == 'ok') {
        let res = JSON.parse(jo.result)
        //tag)
        if (res.code == 200) {
          //tag
          if (res.data.code == 200) {
            this.$showMessage('上传并转维修成功！')
          } else {
            this.$showMessage('上传并转维修成功，回写安检单失败！')
          }
          this.$dispatch('confirm')
          // this.$back()
        } else {
          this.$showMessage('上传失败！')
          this.onlySave = true
        }
      } else {
        this.$showMessage('网络异常,上传失败！')
        this.onlySave = true
      }
    },
    todo() {
      let gen = getRepairParam(this)
      co(gen)
    },
    undo() {
      this.showCheckToRepair = !this.showCheckToRepair
      this.model.serviceacitivity[0].f_reciever = ''
      this.model.serviceacitivity[0].f_meetunit = ''
      this.model.f_repairtype = ''
      this.meading = '转站点'
    },
    disableTimer() {
      if (this.timer) {
        window.clearTimeout(this.timer)
        this.timer = null
      }
    },
    loaded(paper) {
      if (!paper.hasOwnProperty('id')) {
        this.$showMessage("该安检单在手机上已经不存在，可能是卸载过程序。可以进入重新安检，或返回安检计划。")
        this.init()
      } else {
        Util.booleanFilter(paper)
        HostApp.__this__.$set('data', paper)
        HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
        // 如果打回重检则重新计时
        //tag
        if (HostApp.__this__.role == 'inspect'
          && HostApp.__this__.data.f_approved
          && HostApp.__this__.data.f_approved == '打回') {
          //tag
          HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
          HostApp.__this__.tick()
        }
      }
      HostApp.__callback__ = null
      HostApp.__this__ = null
    },
    S4() {
      return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
    },
    extend(initalObj, finalObj) {
      var obj = finalObj || {};
      for (var i in initalObj) {
        var prop = initalObj[i];

        // 避免相互引用对象导致死循环，如initalObj.a = initalObj的情况
        if (prop === obj) {
          continue;
        }

        if (typeof prop === 'object') {
          if (obj[i]) {
            this.extend(obj[i], prop)
          } else {
            obj[i] = prop;
          }
        }
      }
      return obj;
    },
    // async isoverDate(){
    //   let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
    //       condition:"f_plan_item_id='"+this.item.id+"'"
    //     }
    //   })
    //   this.isneedDate=res.data[0]["f_subscribe_date"]
    // },
    putDevices() {
      //tag)
      //tag)
      this.$set('data.approve', "true")
      this.$set('data.writeback', "false")
      if (Vue.config.safecheck != undefined) {
        if (Vue.config.safecheck.ApproveConfig != undefined) {
          if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
            this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
          }
          if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
            this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
          }
          if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
            this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
          }
          if (Vue.config.safecheck.ApproveConfig.showtorepair) {
            this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
          }
          if (Vue.config.safecheck.ApproveConfig.notencountered != undefined) {
            this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
          }
          if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined) {
            this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
          }
        }
        //tag
        //tag)
        //tag)
        //tag
        if (this.item.f_user_type == '非民用') {
          // 非民用
          if (Vue.config.safecheck.DevicesSetConfig != undefined) {
            if (this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
              this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
            } else {
              //tag
              //tag
              //tag
              this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
            }
            //this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
          }

        } else {
          // 民用户
          if (Vue.config.safecheck.DevicesConfig != undefined) {
            if (this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
              this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
            } else {
              //tag
              //tag
              //tag
              this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type ? this.item.f_user_type : '民用']])
            }
            // this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
          }
        }

      }
      //tag)
      // 预留设备项位置
      for (let i in this.config) {
        this.tabs.splice(1, 0, null)
      }
      //遍历安检项配置
      for (let i in this.config) {
        //取得安检项索引值
        let n = this.config[i].index
        //tag
        this.devices[n - 1] = { device: i, n: n, checkmust: this.config[i].checkmust }
        this.$set('data.' + 'device' + n, [])
        //tag
        // this.tabs.splice(2 + n - 1, 0,
        //   {
        //     header:i,
        //     complete:'safecheck-devices',
        //     class:'repair-details-class',
        //     number:n
        //   })
        this.tabs[n] = {
          header: i,
          complete: 'safecheck-devices',
          class: 'repair-details-class',
          number: n
        }

        if (this.config[i].quantity && this.config[i].quantity > 0) {
          let items = []
          for (let it in this.config[i].items) {
            //赋值下拉选项
            if (this.config[i].items[it].type == 'selector') {
              for (let op in this.config[i].items[it].options) {
                if (this.config[i].items[it].options[op].isdefault == true) {
                  items.push({
                    f_defect_level: this.config[i].items[it].options[op].level,
                    f_is_defect: this.config[i].items[it].options[op].isdefect,
                    f_item_name: it,
                    f_item_value: this.config[i].items[it].options[op].data,
                    f_path: "",
                    type: "selector"
                  })
                }
              }
            }
          }
          for (let q = 0; q < this.config[i].quantity; q++) {
            this.data['device' + n].push(
              { f_device_type: i, f_items: items }
            )
          }
        }
        // this.data['device' + n].push(
        //   {f_device_type: i, f_items: items}
        // )
        n = n + 1
      }
      //tag
      this.faultshow.number = this.tabs.length
    },
    init() {
      //tag
      // this.data.f_noplan_item_id =  this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()
      this.data.ename = Vue.user.ename
      this.data.f_outlets = Vue.user.f_parentname
      this.data.f_meetunit = Vue.user.orgpathnames
      this.data.orgpathstr = Vue.user.orgpathstr
      this.data.f_check_item_id = this.item.id
      this.data.f_check_plan_id = this.f_plan_id
      this.data.f_checker_id = Vue.user.id
      this.data.f_checker_name = Vue.user.name
      this.data.f_check_type = this.item.f_user_type
      this.data.f_safecheck_type = this.item.f_safecheck_type
      //this.data.f_exceed_reason = ''//存放送气超期原因
      //tag
      this.data.f_subcompany = this.item.f_subcompany
      this.data.f_approved = this.item.f_approved
      this.data.f_repair_approved = this.item.f_repair_approved
      this.data.f_no_checkplan = this.item.f_no_checkplan
      this.data.f_approved = this.item.f_approved
      this.data.f_filialeid = this.item.f_filialeid
      this.data.f_orgstr = this.item.f_orgstr
      this.data.version = this.item.version
      this.data.f_check_version = this.item.f_check_version
      this.$set('data.f_meters', this.item.f_plan_meters)
      this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
      // 安检状态
      this.$set('data.f_entry_status', '入户')
      this.$set('data.f_usegas', '已使用')
      this.$set('data.f_state', this.item.f_state)
      this.$set('data.f_source', this.source ? this.source : '安检')
      this.$set('data.f_other_checker_name', '')
      //tag
      // 用户信息
      this.$set('data.f_user_name', this.item.f_user_name)
      this.$set('data.f_rent_phone', this.item.f_rent_phone)
      this.$set('data.f_zuhu_phone', this.item.f_zuhu_phone)
      this.$set('data.f_user_phone', this.item.f_user_phone)
      this.$set('data.f_userinfoid', this.item.f_userinfoid)
      this.$set('data.f_address', this.item.f_address)
      this.$set('data.f_card_id', this.item.f_card_id)
      this.$set('data.f_slice_area', this.item.f_slice_area)
      this.$set('data.f_recheck_id', this.item.id)
      this.$set('rowCodata.f_recheck_id', this.item.id)
      this.$set('data.f_street', this.item.f_street)
      this.$set('data.f_room', this.item.f_room)
      this.$set('data.f_building', this.item.f_building)
      this.$set('data.f_unit', this.item.f_unit)
      this.$set('data.f_ins_stop_date', this.item.f_plan_meters[0].f_ins_stop_date)
      this.$set('data.f_zhongdian', this.item.f_plan_meters[0].f_zhongdian)
      this.$set('data.f_zhongdian_f_remark', this.item.f_plan_meters[0].f_zhongdian_f_remark)
      this.$set('data.f_audit_comments', this.item.f_plan_meters[0].f_audit_comments)
      this.$set('data.f_gas_date', this.item.f_plan_meters[0].f_gas_date)
      this.$set('data.f_uservent_date', this.item.f_plan_meters[0].f_uservent_date)
      this.$set('data.f_gas_pointsnumber', this.item.f_plan_meters[0].f_gas_pointsnumber)
      //tag
      this.$set('data.f_floor', this.item.f_floor)
      this.$set('data.f_residential_area', this.item.f_residential_area)
      this.$set('data.f_idnumber', this.item.f_idnumber)
      this.$set('data.f_comments', this.item.f_comments)
      this.$set('data.f_userproperties', this.item.f_userproperties)
      this.$set('data.f_client_evaluation', '满意')
      this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
      this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
      this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
      // this.$set('data.f_user_inhome_time', this.item.f_user_inhome_time)
      // this.$set('data.f_user_check_time', this.item.f_user_check_time)
      // this.$set('data.f_user_spare_phone', this.item.f_user_spare_phone)
      // this.$set('data.f_user_family_remarks', this.item.f_user_family_remarks)
      // this.$set('data.f_user_equipment_remarks', this.item.f_user_equipment_remarks)
      // 处置方式
      //tag
      this.$set('data.f_gas_guidelines', true)
      this.$set('data.f_safety_warning', true)
      this.$set('data.f_gas_manual', true)
      this.$set('data.f_no_gas_device', false)
      this.$set('data.f_close_valve', false)
      this.$set('data.f_unload_battery', false)
      //tag
      if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检') {
        this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
      }
      if (this.item.f_no_checkplan == '复检') {
        this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
      }
      //tag
      if (this.item.f_plan_meters) {
        for (let de in this.devices) {
          if (typeof this.devices[de] == 'function') {
            continue
          }
          this.$set('data.device' + this.devices[de].n, [])
          for (let i = 0; i < this.item.f_plan_meters.length; i++) {
            if (this.item.f_plan_meters[i].f_meter_type) {
              this.data.f_meter_type = this.item.f_plan_meters[i].f_meter_type
              //tag)
              if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') > 0) {
                this.data['device' + this.devices[de].n].push({
                  f_device_type: "燃气表",
                  f_items: [
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "基表编号",
                      f_item_value: this.item.f_plan_meters[i].f_meter_no,
                      f_path: "",
                      type: "number"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "表具类型",
                      f_item_value: this.item.f_plan_meters[i].f_meter_type,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "气表型号",
                      f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "气表品牌",
                      f_item_value: this.item.f_plan_meters[i].f_aliasname,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "进气方向",
                      f_item_value: this.item.f_plan_meters[i].f_flow_direction,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "上期表读数",
                      f_item_value: this.item.f_plan_meters[i].f_prior_reading,
                      f_path: "",
                      type: "number"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "表箱号",
                      f_item_value: this.item.f_plan_meters[i].f_metertitles,
                      f_path: "",
                      type: "string"
                    }
                  ]
                })
              }
              else if (this.devices[de].device == "燃气表") {
                // delete this.config['燃气表']['items']['表底数']
                this.data['device' + this.devices[de].n].push({
                  f_device_type: "燃气表",
                  f_items: [
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "基表编号",
                      f_item_value: this.item.f_plan_meters[i].f_meter_no,
                      f_path: "",
                      type: "number"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "表具类型",
                      f_item_value: this.item.f_plan_meters[i].f_meter_type,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "气表型号",
                      f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "气表品牌",
                      f_item_value: this.item.f_plan_meters[i].f_aliasname,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "进气方向",
                      f_item_value: this.item.f_plan_meters[i].f_flow_direction,
                      f_path: "",
                      type: "string"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "上期表读数",
                      f_item_value: this.item.f_plan_meters[i].f_prior_reading,
                      f_path: "",
                      type: "number"
                    },
                    {
                      f_defect_level: null,
                      f_device_id: "",
                      f_is_defect: "",
                      f_item_name: "表箱号",
                      f_item_value: this.item.f_plan_meters[i].f_metertitles,
                      f_path: "",
                      type: "string"
                    }
                  ]
                })
              }
              if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
                this.data['device' + this.devices[de].n].forEach(device => {
                  //tag)
                  //tag)
                  /*
                    "累购气量":{"index":8,"type":"number","readonly":true},
                    "累购金额":{"index":8,"type":"number","readonly":true},
                    "字轮读数":{"index":9,"type":"number","checkmust": true},
                    "已用金额":{"index":9,"type":"number","checkmust": true},
                    "剩余气量":{"index":10,"type":"number","checkmust": true},
                    "剩余金额":{"index":10,"type":"number","checkmust": true},
                    "气量异常差值":{"index":11,"type":"number","readonly": true},
                    "金额异常差值":{"index":11,"type":"number","readonly": true}
                  */
                  if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
                    if (!this.data.f_collection_type) {
                      this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
                      delete this.config['燃气表']['items']['累购气量']
                      delete this.config['燃气表']['items']['已用气量']
                      delete this.config['燃气表']['items']['剩余气量']
                      delete this.config['燃气表']['items']['气量异常差值']
                      device.f_items.push(
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "初始表底",
                          isshow: false,
                          f_item_value: '',
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "累购金额",
                          f_item_value: this.item.f_plan_meters[i].f_total_fee,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "已用金额",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "机械读数",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "电子读数",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "剩余金额",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "计量误差异常差值",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "金额异常差值",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        }
                      )
                      //tag)
                    }
                  } else
                  if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
                    if (!this.data.f_collection_type) {
                      this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
                      delete this.config['燃气表']['items']['累购金额']
                      delete this.config['燃气表']['items']['已用金额']
                      delete this.config['燃气表']['items']['剩余金额']
                      delete this.config['燃气表']['items']['金额异常差值']
                      device.f_items.push(
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "初始表底",
                          isshow: true,
                          f_item_value: this.item.f_plan_meters[i].f_initial_base,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "累购气量",
                          f_item_value: this.item.f_plan_meters[i].f_total_gas,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "已用气量",
                          f_item_value: this.item.f_plan_meters[i].f_meter_base,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "机械读数",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "电子读数",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "剩余气量",
                          f_item_value: "",
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect: "",
                          f_item_name: "计量误差异常差值",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        },
                        {
                          f_defect_level: null,
                          f_device_id: "",
                          f_is_defect:"",
                          f_item_name: "气量异常差值",
                          f_item_value: null,
                          f_path: "",
                          type: "number"
                        }
                      )
                      //tag)
                    }
                  }
                })
              }
              else if (this.devices[de].device == "燃气表") {
                //tag
                this.data['device' + this.devices[de].n].forEach(device => {
                  //tag)
                  if (!this.data.f_collection_type) {
                    this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
                    delete this.config['燃气表']['items']['累购金额']
                    delete this.config['燃气表']['items']['已用金额']
                    delete this.config['燃气表']['items']['剩余金额']
                    delete this.config['燃气表']['items']['金额异常差值']
                    device.f_items.push(
                      {
                        f_defect_level: null,
                        f_device_id: "",
                        f_is_defect: "",
                        f_item_name: "初始表底",
                        isshow: true,
                        f_item_value: this.item.f_plan_meters[i].f_initial_base,
                        f_path: "",
                        type: "number"
                      },
                      {
                        f_defect_level: null,
                        f_device_id: "",
                        f_is_defect: "",
                        f_item_name: "累购气量",
                        f_item_value: this.item.f_plan_meters[i].f_total_gas,
                        f_path: "",
                        type: "number"
                      },
                      {
                        f_defect_level: null,
                        f_device_id: "",
                        f_is_defect: "",
                        f_item_name: "已用气量",
                        f_item_value: this.item.f_plan_meters[i].f_meter_base,
                        f_path: "",
                        type: "number"
                      },
                      {
                        f_defect_level: null,
                        f_device_id: "",
                        f_is_defect: "",
                        f_item_name: "剩余气量",
                        f_item_value: '',
                        f_path: "",
                        type: "number"
                      },
                      {
                        f_defect_level: null,
                        f_device_id: "",
                        f_is_defect: "",
                        f_item_name: "气量异常差值",
                        isshow: false,
                        f_item_value: null,
                        f_path: "",
                        type: "number"
                      }
                    )
                    //tag)
                  }
                })
              }
            }
          }
        }
      }
      var pardate = {
        _this: this,
        tittle: '安检详情',
        safe: true
      }
      // this.$dispatch('gotoson',pardate)
      //tag
      this.$goto('safecheck-userinfo', { userinfo: this.data }, 'repair')
    }
  },
  watch: {
    'row'() {
      //tag
      this.copy()
    }
  },
  async ready() {
    //送气超期功能
    //await this.isoverDate()
    this.putDevices()
    //如果已检，则提取安检单
    if (this.item.f_state != '未检' && this.item.f_last_check_state != '到访不遇') {
      if (this.role == 'inspect' || this.role == 'androidview') {
        HostApp.__callback__ = this.loaded
        HostApp.__this__ = this
        let that = this
        let value = {}
        //tag
        if (this.role == 'inspect') {
          //tag
          if (this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {
            value = this.$androidUtil.path({
              alias: 'getUserinfomation',
              data: { condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan in ('无计划安检','复检')" }
            })
          } else {
            value = this.$androidUtil.bzLogic('FetchCheckPaper', { id: this.item.id })
          }
        } else {
          value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, { data: { condition: `id = '${this.item.f_paper_id}'` } })
        }
        Util.replaceFalse(value)
        //tag)
        if (value.data.length != 0) {
          that.$set('data', value.data[0])
          //tag)
          if (this.data.f_collection_type == '按气量') {
            delete this.config['燃气表']['items']['累购金额']
            delete this.config['燃气表']['items']['已用金额']
            delete this.config['燃气表']['items']['剩余金额']
            delete this.config['燃气表']['items']['金额异常差值']
          } else if (this.data.f_collection_type == '按金额') {
            delete this.config['燃气表']['items']['累购气量']
            delete this.config['燃气表']['items']['已用气量']
            delete this.config['燃气表']['items']['剩余气量']
            delete this.config['燃气表']['items']['气量异常差值']
          }
          //tag)
          if (value.data[0].f_devices) {
            for (let da in that.devices) {
              if (typeof that.devices[da] == 'function') {
                continue
              }
              that.$set('data.device' + that.devices[da].n, [])
            }
            value.data[0].f_devices.forEach((item) => {
              //tag)
              for (let i in item.f_items) {
                if (typeof item.f_items[i] == 'function') {
                  continue
                }
                // if (item.f_items[i].f_path != '' && item.f_items[i].f_path != null) {
                //   this.picture.push({f_path: item.f_items[i].f_path, name: item.f_items[i].f_item_name})
                // }
                for (let de in that.config[item.f_device_type].items) {
                  if (typeof that.config[item.f_device_type].items[de] == 'function') {
                    continue
                  }
                  if (item.f_items[i].f_item_name == de) {
                    if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
                      item.f_items[i].f_item_value = []
                    } else {
                      item.f_items[i].f_item_value = ''
                    }
                  }
                }
                //tag)

                // if (item.f_items[i].f_item_name=='累购气量'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_total_gas
                // }else if (item.f_items[i].f_item_name=='累购金额'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_total_fee
                // }else if (item.f_items[i].f_item_name=='基表编号'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_meter_no
                // }else if (item.f_items[i].f_item_name=='气表品牌'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_aliasname
                // }else if (item.f_items[i].f_item_name=='进气方向'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_flow_direction
                // }else if (item.f_items[i].f_item_name=='气表型号'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_diaphgram_size
                // }else if (item.f_items[i].f_item_name=='表箱号'){
                //   item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_metertitles
                // }
                // else{
                for (let j in item.f_items[i].f_item_lists) {
                  if (typeof item.f_items[i].f_item_lists[j] == 'function') {
                    continue
                  }
                  //tag)
                  if (item.f_items[i].f_item_value instanceof Array) {
                    item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
                  } else {
                    item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
                  }
                }
                // }

              }
              for (let de in that.devices) {
                if (typeof that.devices[de] == 'function') {
                  continue
                }
                if (that.devices[de].device == item.f_device_type) {
                  that.data['device' + that.devices[de].n].push({
                    f_device_type: item.f_device_type,
                    f_items: item.f_items
                  })
                  //tag)
                }
              }
            })
            if (this.role == 'androidview') {
              Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
              Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
              Util.booleanFilter(that.data)
            }
            //tag)
          }
          if (this.item.f_plan_meters && this.item.f_plan_meters[0]){
            this.$set('data.f_ins_stop_date', this.item.f_plan_meters[0].f_ins_stop_date)
            this.$set('data.f_zhongdian', this.item.f_plan_meters[0].f_zhongdian)
            this.$set('data.f_audit_comments', this.item.f_plan_meters[0].f_audit_comments)
            this.$set('data.f_gas_date', this.item.f_plan_meters[0].f_gas_date)
            this.$set('data.f_gas_pointsnumber', this.item.f_plan_meters[0].f_gas_pointsnumber)
            this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
            this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
            this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
          }
        } else {
          //tag
          this.init()
        }
        if (this.parentPage && this.parentPage == 'CurrentCreate') {
          //tag
          let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数，为true则是开启全程录音
          if (isRecodr) {
            if (isRecodr == 'true') {
              this.$showMessage("为了保证服务质量，您的电话将会被全程录音！")
              // 初始化录音
              let resse = this.record()
            }
          }
        }
        //tag
        var pardate = {
          _this: this,
          tittle: '安检详情',
          safe: true
        }
        // this.$dispatch('gotoson',pardate)getImgPath
        this.$goto('safecheck-userinfo', { userinfo: this.data }, 'repair')
      } else {
        let that = this
        let id
        if (this.role == 'view') {
          id = this.item.id
        }
        this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, { data: { condition: `id = '${id}'` } }).then((respanse) => {
            if (respanse.data.length != 0) {
              that.data = Object.assign(that.data, respanse.data[0])
              if (respanse.data[0].f_devices) {
                for (let da in that.devices) {
                  that.$set('data.device' + that.devices[da].n, [])
                }
                respanse.data[0].f_devices.forEach((item) => {
                  for (let de in that.devices) {
                    if (that.devices[de].device == item.f_device_type) {
                      that.data['device' + that.devices[de].n].push({
                        f_device_type: item.f_device_type,
                        f_items: item.f_items
                      })
                    }
                  }
                })
              }
              Util.replaceFalse(that.data)
              Util.booleanFilter(that.data)
              if (this.role == 'view') {
                Util.ratifyPics(that.data)
              } else {
                Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
              }
              //tag
            } else {
              alert("该安检单可能已不在本地!")
              this.init()
            }
            var pardate = {
              _this: this,
              tittle: '安检详情',
              safe: true
            }
            // this.$dispatch('gotoson',pardate)
            this.$goto('safecheck-userinfo', { userinfo: this.data }, 'paper-router')
          }
        ).catch(
          (respanse) => {
            alert('查找安检单失败')
          })
      }
    } else {
      if (this.parentPage && this.parentPage == 'CurrentCreate') {
        //tag
        let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数，为true则是开启全程录音
        if (isRecodr) {
          if (isRecodr == 'true') {
            // this.$showMessage("为了保证服务质量，您的电话将会被全程录音！")
            // 初始化录音
            let resse = this.record()
          }
        }
      }
      this.init()
    }
    // tbs合并数组
    // if( this.model.serviceacitivity[0].servicerepair.length > 0){
    //   for(let i = 0;i < this.model.serviceacitivity[0].servicerepair.length;i++ ){
    //
    //   }
    // }
  },
  components: {
    // 'door-service': DoorService,
    // 'repair-info': RepairInfo,
    // 'repair-user-info': RepairUserInfo,
    // 'outlay': Outlay,
    // 'fault-all': FaultAll,
    // 'repair-details':RepairDetails
    // 'pipeline': Pipeline,
    // 'device-service': DeviceService,
    // 'trouble-removal': TroubleRemoval,
    // 'cooking-utensils': CookingUtensils,
    // 'repair-matter-info': RepairMatterInfo,
    // 'first-gas-check': FirstGasCheck,
    // 'tel-change-matter': TelChangeMatter/
  },
  events: {
    'tijiao': function () {
      // 事件回调内的 `this` 自动绑定到注册它的实例上
      this.confirm()
    }
  }
}
</script>
<style lang="less">
@import "../../../../src/bootstrap/less/variables.less";

.noclickbut {
  pointer-events: none;
}

.tab-befor-img (@url) {
  content: '';
  background-image: url("@{url}");
  background-size: 20px;
  display: inline-block;
  margin-right: 8px;
  margin-top: 0.3em;
  height: 1.3em;
  width: 1.3em;
  vertical-align: -35%;
}

@media screen and (min-width: 768px) {
  .android-repair-order>div>ul a {
    font-size: @font-size-h2;
    margin: 0.3em 0;
  }
}

.repair-details-class {
  &::before {
    .tab-befor-img("../../../assets/huneiweixiu1.png");
  }
}

.repair-info-class {
  &::before {
    .tab-befor-img("../../../assets/baoxiuxinxi1.png");
  }
}

.repair-user-info-class {
  &::before {
    .tab-befor-img("../../../assets/jibenxinxi1.png")
  }
}

.door-service-class {
  &::before {
    .tab-befor-img("../../../assets/huneiweixiu1.png")
  }
}

.pipeline-class {
  &::before {
    .tab-befor-img("../../../assets/guandao1.png")
  }
}

.device-service-class {
  &::before {
    .tab-befor-img("../../../assets/shebeiweixiu1.png")
  }
}

.trouble-removal-class {
  &::before {
    .tab-befor-img("../../../assets/shiguchuli.png")
  }
}

.cooking-utensils-class {
  &::before {
    .tab-befor-img("../../../assets/zaoju1.png")
  }
}

.outlay-class {
  &::before {
    .tab-befor-img("../../../assets/feiyong1.png")
  }
}

.fault-all-class {
  &::before {
    .tab-befor-img("../../../assets/guzhanghuizong1.png")
  }
}

.photo-write-class {
  &::before {
    .tab-befor-img("../../../assets/zaoju.png")
  }
}

.delay-apply-class {
  &::before {
    .tab-befor-img("../../../assets/yonghubaoxiu.png")
  }
}

.repair-back-class {
  &::before {
    .tab-befor-img("../../../assets/fanhui.png")
  }
}

.butt2 {
  display: inline;
  float: right;
  width: 10px;
  text-align: center;
  align-items: center;
  position: absolute;
  top: 50%;

  left: 90%;
  transform: translate(-50%, -50%);
}

.linesty {
  display: inline-block;
  height: 1px;
  width: 100%;
  background: #d0d0d0;
  overflow: hidden;
  vertical-align: middle;
}

.spanboder {
  border-bottom: 2px solid #499edf;
  padding-bottom: 8px
}

.app-botton {
  position: fixed;
  background: #87b2dd;
  right: 8px;
  color: #FFF;
  padding: 8px;
  text-align: center;
  font-size: 1.2em;
  z-index: 10;
  opacity: 0.5;
  bottom: 50px;
  margin-top: -10px;
  height: 40px;
}

.android-repair-order>div>ul a {
  font-size: 12px;
  color: #333333;
  padding: 13px 16px;
}
</style>
