MrShi
2025-04-16 090ea2c7d46a7082e978e6c0134d3fbeafaa34a0
h5/pages/staff/task/visitorApprove.vue
@@ -45,7 +45,7 @@
            <view class="value">{{ info.companyName }}</view>
         </view>
         <view class="item">
            <view class="label">施工人员</view>
            <view class="label">是否涉及施工作业</view>
            <view class="value">{{ info.type == 0 ? "否" : "是" }}</view>
         </view>
         <view class="item">
@@ -68,7 +68,7 @@
               <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" />
                     src="@/static/staff/ic_shenpiren@2x.png" />
                  <image v-else-if="item.faceImg" :src="item.faceImg" class="img"></image>
                  <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"
@@ -106,7 +106,10 @@
        info.approveDateVO.canBeApproved != null &&
        info.approveDateVO.canBeApproved == 1
      " class="main_footer">
         <view class="btn" @click="cancelShow = true" v-if="checkAuth('business:visits:cancel') && [0,1,2,5].includes(info.status)">取消预约</view>
         <view style="width: 30rpx; height: 100%;"></view>
         <view class="btn" @click="handleSub(3)">拒绝</view>
         <view style="width: 30rpx; height: 100%;"></view>
         <view class="btn agree" @click="handleSub(2)">同意</view>
      </view>
@@ -118,21 +121,34 @@
          " placeholder-class="placeholder9" />
            <view class="main_footer">
               <view class="btn" @click="showApprModal = false">取消</view>
               <view style="width: 30rpx; height: 100%;"></view>
               <view class="btn agree" @click="onSubmit">提交</view>
            </view>
         </view>
      </u-popup>
      <!-- 取消预约弹窗 -->
      <u-modal
         :show="cancelShow"
         :showCancelButton="true"
         title="系统提示"
         content='确定取消当前预约吗?'
         @cancel="cancelShow = false"
         @confirm="cancel" />
   </view>
</template>
<script>
   import {
      getVisitedDetail, // 访客预约详情
      carUseBookAppr
      carUseBookAppr,
      visitsCancel
   } from '@/api'
   export default {
      data() {
         return {
            userInfo: uni.getStorageSync('userInfo') || {
               permissions: []
            },
            showApprModal: false,
            param: {},
            info: {},
@@ -167,15 +183,27 @@
               2: '已通过',
               3: '已拒绝',
               4: '已取消',
            }
            },
            cancelShow: false
         }
      },
      onLoad(op) {
      onLoad(op) {
         uni.setStorageSync('ywinfo',{})
         this.id = op.id
         this.getDetail()
      },
      methods: {
         // 取消预约
         cancel() {
            visitsCancel(this.id).then(res => {
               this.cancelShow = false
               this.getDetail()
            })
         },
         checkAuth(str) {
            const permissions = this.userInfo.permissions || []
            return permissions.indexOf(str) > -1
         },
         getDetail() {
            const {
               id
@@ -229,7 +257,7 @@
            })
         },
         handleSub(status) {
            // this.param.flag =
            // this.param.flag =
            this.param = {
               status
            }
@@ -503,7 +531,8 @@
         background: #ffffff;
         .btn {
            width: 336rpx;
            // width: 336rpx;
            flex: 1;
            height: 88rpx;
            line-height: 88rpx;
            background: #ffffff;
@@ -551,4 +580,4 @@
         margin: 0 -30rpx;
      }
   }
</style>
</style>