jiangping
2024-09-24 6a2689a44840490a64cf66b37eb09e45eb1da244
h5/pages/staff/task/visitorApprove.vue
@@ -2,28 +2,16 @@
  <view class="main_app">
    <view class="status_wrap">
      <view class="name">{{ info.name }}提交的{{ cateList[type].name }}</view>
      <view
        class="desc"
        :class="{
         <view class="desc" :class="{
          gray: info.businessStatus == '2' || info.businessStatus == '3' || info.businessStatus == '4',
        }"
        >{{ infoStatus }}</view
      >
        }">{{ infoStatus }}</view>
      <view v-if="info.businessStatus == '0' || info.businessStatus == '1'" class="status">{{
        statusMap[info.businessStatus]
      }}</view>
      <image
        v-if="info.businessStatus == '2'"
        src="@/static/ic_passed@2x.png"
        mode="widthFix"
        class="status_img"
      ></image>
      <image
        v-if="info.businessStatus == '3'"
        src="@/static/ic_refused@2x.png"
        mode="widthFix"
        class="status_img"
      ></image>
         <image v-if="info.businessStatus == '2'" src="@/static/ic_passed@2x.png" mode="widthFix" class="status_img">
         </image>
         <image v-if="info.businessStatus == '3'" src="@/static/ic_refused@2x.png" mode="widthFix" class="status_img">
         </image>
    </view>
    <!--  -->
    <view class="emyty"></view>
@@ -40,15 +28,11 @@
      <view class="item">
        <view class="label">访客信息</view>
        <view class="value">
          <image
            class="avatar"
            :src="
               <image class="avatar" :src="
              info.prefix
                ? info.prefix + info.faceImg
                : require('@/static/meeting/common/default_user@2x.png')
            "
            mode="widthFix"
          ></image>
            " mode="widthFix"></image>
          <view class="info">
            <text class="name">{{ info.name }} {{ info.phone }}</text>
            <text>身份证号:{{ info.idCardDecode }}</text>
@@ -76,42 +60,19 @@
    <!-- 流程 -->
    <view class="flow_wrap">
      <view class="flow_title">流程</view>
      <view
        class="list"
        v-if="
         <view class="list" v-if="
          info.approveDateVO != null && info.approveDateVO.approveList != null
        "
      >
        <view
          class="item"
          v-for="(item, index) in info.approveDateVO.approveList"
          :key="item.id"
        >
        ">
            <view class="item" v-for="(item, index) in info.approveDateVO.approveList" :key="item.id">
          <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="@/static/staff/ic_shenpiren@2x.png"
            />
                  <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="@/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"
              src="@/static/staff/liucheng_success@2x.png"
              mode="widthFix"
            />
            <image
               v-if="item.status == 3"
              class="status"
              src="@/static/staff/liucheng_fail@2x.png"
              mode="widthFix"
            />
                  <image v-if="item.status == 2" class="status" src="@/static/staff/liucheng_success@2x.png"
                     mode="widthFix" />
                  <image v-if="item.status == 3" class="status" src="@/static/staff/liucheng_fail@2x.png" mode="widthFix" />
          </view>
          <view class="content">
            <view class="head">
@@ -119,28 +80,17 @@
              <view class="time">{{ item.checkDate }}</view>
            </view>
            <view class="name_wrap">
              <text
                >{{ item.memberName
                }}<text :class="{ status: item.statusInfo == '处理中' || item.status == '1'  }" v-if="item.statusInfo"
                  >({{ item.statusInfo }})</text
                ></text
              >
                     <text>{{ item.memberName
                }}<text :class="{ status: item.statusInfo == '处理中' || item.status == '1'  }"
                           v-if="item.statusInfo">({{ item.statusInfo }})</text></text>
            </view>
            <view v-if="item.checkInfo" class="remark">{{
              item.checkInfo
            }}</view>
            <!-- 抄送人 -->
            <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"
                />
                     <view class="child" v-for="child in item.approveList" :key="child.id">
                        <image v-if="child.faceImg" class="child_img" :src="child.faceImg" />
                        <view v-else class="child_name">{{ child.memberName && child.memberName.slice(0,1) }}</view>
                <view>{{ child.memberName }}</view>
              </view>
@@ -150,34 +100,21 @@
      </view>
    </view>
    <view class="emyty"></view>
    <view
      v-if="
      <view v-if="
        info.approveDateVO != null &&
        info.approveDateVO.canBeApproved != null &&
        info.approveDateVO.canBeApproved == 1
      "
      class="main_footer"
    >
      " class="main_footer">
      <view class="btn" @click="handleSub(3)">拒绝</view>
      <view class="btn agree" @click="handleSub(2)">同意</view>
    </view>
    <u-popup
      :show="showApprModal"
      :round="10"
      :safeAreaInsetBottom="true"
      mode="bottom"
      @close="showApprModal = false"
    >
      <u-popup :show="showApprModal" :round="10" :safeAreaInsetBottom="true" mode="bottom" @close="showApprModal = false">
      <view class="appr_modal">
        <view class="title">{{ param.status == 2 ? "同意" : "拒绝" }}</view>
        <textarea
          v-model="param.checkInfo"
          :placeholder="
            <textarea v-model="param.checkInfo" :placeholder="
            param.status == 2 ? '同意说明,非必填' : '拒绝说明,必填'
          "
          placeholder-class="placeholder9"
        />
          " placeholder-class="placeholder9" />
        <view class="main_footer">
          <view class="btn" @click="showApprModal = false">取消</view>
          <view class="btn agree" @click="onSubmit">提交</view>
@@ -202,12 +139,26 @@
      id: '',
      type: '',
         infoStatus: '',
      cateList: [
        { name: '访客申请', id: 0 },
        { name: '访客报备', id: 1 },
        { name: '用车申请', id: 2 },
        { name: '隐患随手拍', id: 3 },
        { name: '物流车申请', id: 4 },
            cateList: [{
                  name: '访客申请',
                  id: 0
               },
               {
                  name: '访客报备',
                  id: 1
               },
               {
                  name: '用车申请',
                  id: 2
               },
               {
                  name: '隐患随手拍',
                  id: 3
               },
               {
                  name: '物流车申请',
                  id: 4
               },
      ],
      statusMap: {
        0: '待审批',
@@ -226,8 +177,12 @@
  },
  methods: {
    getDetail() {
      const { id } = this
      getVisitedDetail({ id }).then(res => {
            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 => {
@@ -244,7 +199,10 @@
      })
    },
    onSubmit() {
      const { param, info } = this
            const {
               param,
               info
            } = this
         if(param.status == '3' && !param.checkInfo){
            return uni.showToast({
              title: '请输入拒绝说明',
@@ -305,6 +263,7 @@
        display: flex;
        margin-bottom: 48rpx;
        position: relative;
        .separate {
          position: absolute;
          width: 4rpx;
@@ -314,6 +273,7 @@
          transform: translate(-50%, 0);
          top: 80rpx;
        }
        .avatar {
          width: 80rpx;
          height: 80rpx;
@@ -322,15 +282,18 @@
               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;
@@ -367,10 +330,12 @@
              color: $uni-color-primary;
            }
          }
          .children {
            display: flex;
            flex-wrap: wrap;
            margin-top: 12rpx;
            .child {
              display: flex;
              flex-direction: column;
@@ -379,12 +344,14 @@
              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;
@@ -410,26 +377,31 @@
            line-height: 36rpx;
          }
        }
        .carbon {
          display: flex;
          width: 590rpx;
          overflow-x: auto;
          margin-top: 12rpx;
          .carbon_item {
            text-align: center;
            flex-shrink: 0;
            width: 100rpx;
            image {
              width: 60rpx;
              height: 60rpx;
              margin: 0 auto;
            }
            view {
              font-size: 26rpx;
              color: #777777;
            }
          }
        }
        &:nth-last-child(1) {
          .separate {
            height: 0;
@@ -495,6 +467,7 @@
      font-size: 26rpx;
      color: #ed4545;
    }
    .gray {
      color: #999999;
    }
@@ -510,6 +483,7 @@
      background-color: #e9edff;
      color: $uni-color-primary;
    }
    .status_img {
      position: absolute;
      right: 0rpx;
@@ -528,6 +502,7 @@
    display: flex;
    justify-content: space-between;
    background: #ffffff;
    .btn {
      width: 336rpx;
      height: 88rpx;