<template>
  <view class="Scanning_insEnd">
    <view class="Scanning_top" v-if="infoDATA.status==200">
      <view class="Scanning_top_icon">
        <text class="cubeic-ok newicon newicon-duigou"></text>
      </view>
      <view class="Scanning_top_text">
        <view class="text1">
          操作成功
        </view>
      </view>
    </view>

    <view class="Scanning_top" v-if="infoDATA.status==10005||infoDATA.status==100018||infoDATA.status==10004||infoDATA.status==100021||infoDATA.status==100031||infoDATA.status==500">
      <view class="Scanning_top_icon">
        <text class="cubeic-close newicon newicon-shibai"></text>
      </view>
      <view class="Scanning_top_text">
        <view class="text1">
          操作失败
        </view>
      </view>
    </view>

    <view class="Scanning_cont" v-if="infoDATA.status==200&&type=='specimenPlan'||infoDATA.status==200&&type=='specimen'">

    </view>
    <view class="Scanning_cont" v-if="infoDATA.status==200&&type=='patientTransport'||type=='inspect'">
      <view>请将患者送往目标科室.</view>
      <view v-if="infoDATA.patient">
        患者姓名 : {{infoDATA.patient||'-'}}
      </view>
      <view v-if="infoDATA.residenceNo">
        住院号 : {{infoDATA.residenceNo||'-'}}
      </view>
      <view v-if="infoDATA.deptName">
        住院科室 : {{infoDATA.deptName||'-'}}
      </view>
      <view v-if="infoDATA.bedNum">
        床号 : {{infoDATA.bedNum||'-'}}
      </view>
    </view>
    <view class="Scanning_cont" v-if="infoDATA.status==200&&type=='drugsBag'">
      请将药品送往目标科室.
    </view>
    <view class="Scanning_cont" v-if="infoDATA.status!=200">
      <view>
        {{infoDATA.msg}}
      </view>
    </view>
    <view class="foot_btn">
      <view class="btn3" @click="showAlert()">
        返回
      </view>
    </view>
  </view>
</template>
<script>
  import {
    get,
    post,
    webHandle
  } from "../../http/http.js";
  export default {
    data() {
      return {
        infoDATA: [],
        type: ""
      };
    },
    methods: {
      // 返回
      showAlert() {
        uni.navigateTo({
          url: '../receiptpage/receiptpage'
        });
      }
    },
    onLoad(options) {
      let list = JSON.parse(options.model);
      this.infoDATA = list;
      if (options.type) {
        this.type = options.type;
      } else {
        this.type = list.type;
      }
      // #ifdef APP-PLUS
      webHandle('no','app')
      // #endif
      // #ifdef H5
      webHandle('no','wx')
      // #endif
    }
  };
</script>
<style lang="less">
  .Scanning_insEnd {
    padding: 0 74rpx;

    .Scanning_top {
      height: 270rpx;

      .red {
        background-color: #ff3b53 !important;
      }

      .Scanning_top_icon {
        width: 140rpx;
        height: 140rpx;
        margin: 0 auto;
        margin-top: 116rpx;
        border-radius: 50%;
        line-height: 140rpx;

        .cubeic-ok {
          font-size: 140rpx;
          color: #35b34a
        }

        .cubeic-close {
          font-size: 140rpx;
          color: #ff3b53;
        }
      }

      .Scanning_top_text {
        .text1 {
          margin-top: 40rpx;
          font-size: 48rpx;
          text-align: center;
        }
      }
    }

    .Scanning_cont {
      font-size: 32rpx;
      text-align: center;

      view {
        margin-bottom: 16rpx;
      }

      .text {
        margin-top: 24rpx;
        color: #35b34a;
      }

      .text1 {
        margin-top: 24rpx;
        color: #ff3b53;
      }
    }

    .foot_btn {
      line-height: 88rpx;
      height: 100rpx;
      margin-top: 40rpx;

      .btn3 {
        height: 88rpx;
        width: 45%;
        background-image: linear-gradient(to right, #72c172, #3bb197);
        color: #fff;
        border-radius: 8rpx;
        font-size: 32rpx;
        margin: 16rpx auto 0;
        text-align: center;
      }
    }
  }
</style>
