ll
liukangdong
2024-09-11 de0e3ab6247895cb9a375fb3c37e659b2297151c
h5/pages/staff/task/visitorApprove.vue
@@ -5,21 +5,21 @@
      <view
        class="desc"
        :class="{
          gray: info.status == '2' || info.status == '5' || info.status == '4',
          gray: info.businessStatus == '2' || info.businessStatus == '3' || info.businessStatus == '4',
        }"
        >{{ statusMap[info.status] }}</view
        >{{ infoStatus }}</view
      >
      <view v-if="info.status == '0'" class="status">{{
        statusMap[info.status]
      <view v-if="info.businessStatus == '0' || info.businessStatus == '1'" class="status">{{
        statusMap[info.businessStatus]
      }}</view>
      <image
        v-if="info.status == '2'"
        v-if="info.businessStatus == '2'"
        src="@/static/ic_passed@2x.png"
        mode="widthFix"
        class="status_img"
      ></image>
      <image
        v-if="info.status == '3' || info.status == '6'"
        v-if="info.businessStatus == '3'"
        src="@/static/ic_refused@2x.png"
        mode="widthFix"
        class="status_img"
@@ -85,14 +85,17 @@
        >
          <view class="separate"></view>
          <view class="avatar">
                  <image
                     v-if="item.type == 1"
                    class="img"
                    src="@/static/staff/ic_chaosong@2x.png"
                  />
            <image
               v-else-if="item.approveType == 1 || item.approveType == 0"
              class="img"
              :src="
                item.faceImg
                  ? item.faceImg
                  : require('@/static/meeting/common/default_user@2x.png')
              "
              src="@/static/staff/ic_shenpiren@2x.png"
            />
                  <span v-else class="img_name">{{item.memberName && item.memberName.slice(0,1)}}</span>
            <image
               v-if="item.status == 2"
              class="status"
@@ -114,7 +117,7 @@
            <view class="name_wrap">
              <text
                >{{ item.memberName
                }}<text class="status" v-if="item.statusInfo"
                }}<text :class="{ status: item.statusInfo == '处理中' || item.status == '1'  }" v-if="item.statusInfo"
                  >({{ item.statusInfo }})</text
                ></text
              >
@@ -123,20 +126,18 @@
              item.checkInfo
            }}</view>
            <!-- 抄送人 -->
            <view v-if="item.approveType == 1" class="children">
            <view v-if="item.approveType == 0 || item.type == 1 || item.approveType == 1" class="children">
              <view
                class="child"
                v-for="child in item.approveList"
                :key="child.id"
              >
                <image
                           v-if="child.faceImg"
                  class="child_img"
                  :src="
                    child.faceImg
                      ? child.faceImg
                      : require('@/static/meeting/common/default_user@2x.png')
                  "
                  :src="child.faceImg"
                />
                        <view v-else class="child_name">{{ child.memberName && child.memberName.slice(0,1) }}</view>
                <view>{{ child.memberName }}</view>
              </view>
            </view>
@@ -196,6 +197,7 @@
      id: '',
      type: '',
         infoStatus: '',
      cateList: [
        { name: '访客申请', id: 0 },
        { name: '访客报备', id: 1 },
@@ -209,14 +211,13 @@
        2: '已通过',
        3: '已拒绝',
        4: '已取消',
        5: '他人或签',
        6: '他人拒绝',
      }
    }
  },
  onLoad(op) {
    this.id = op.id
    this.type = op.objType
    this.infoStatus = op.info
    this.getDetail()
  },
  methods: {
@@ -224,10 +225,28 @@
      const { id } = this
      getVisitedDetail({ id }).then(res => {
        this.info = res.data
            if(this.info.approveDateVO && this.info.approveDateVO.approveList.length > 0 ){
               this.info.approveDateVO.approveList.forEach(item => {
                  if(item.approveList && item.approveList.length == 1 && item.type !== 1){
                     item.title = item.approveList[0].title
                     item.faceImg = item.approveList[0].faceImg
                     item.memberName = item.approveList[0].memberName
                     item.statusInfo = item.approveList[0].statusInfo
                     item.status = item.approveList[0].status
                     item.approveList = []
                  }
               })
            }
      })
    },
    onSubmit() {
      const { param, info } = this
         if(param.status == '3' && !param.checkInfo){
            return uni.showToast({
              title: '请输入拒绝说明',
              icon: 'none'
            })
         }
      carUseBookAppr({
        status: param.status,
        objType: info.type,
@@ -252,7 +271,6 @@
      this.param = {
        status
      }
      this.showApprModal = true
      this.showApprModal = true
    },
  },
@@ -297,13 +315,18 @@
          height: 80rpx;
          position: relative;
          margin-right: 20rpx;
               display: flex;
               align-items: center;
               justify-content: center;
          .img {
            width: 80rpx;
            height: 80rpx;
            border-radius: 50%;
          }
               .img_name{
                  font-size: 32rpx;
                  color: #FFFFFF;
               }
          .status {
            width: 28rpx;
            height: 28rpx;
@@ -350,11 +373,26 @@
              justify-content: center;
              align-items: center;
              margin-right: 12rpx;
                     font-size: 26rpx;
                     color: #777777;
              .child_img {
                width: 48rpx;
                height: 48rpx;
                border-radius: 50%;
                        margin-bottom: 2rpx;
              }
                     .child_name{
                        margin-bottom: 2rpx;
                        width: 48rpx;
                        height: 48rpx;
                        text-align: center;
                        justify-content: center;
                        padding-top: 4rpx;
                        font-size: 28rpx;
                        border-radius: 50%;
                        color: #FFFFFF;
                        background-color: $uni-color-primary;
                     }
            }
          }
@@ -482,7 +520,7 @@
    justify-content: space-between;
    width: 100%;
    left: 0;
    padding: 30rpx 10rpx 60rpx;
    // padding: 30rpx 10rpx 60rpx;
    display: flex;
    justify-content: space-between;
    background: #ffffff;