|
|
|
<template>
|
|
|
|
<view class="p-3">
|
|
|
|
<!-- 交付物名称 -->
|
|
|
|
<view class="flex justify-between" @click="collapsed = !collapsed">
|
|
|
|
<!-- {{ deliverData ? deliverData.deliverName : '' }} -->
|
|
|
|
|
|
|
|
<text> {{ deliverData ? deliverData.deliverName : '' }} 审核状态 </text>
|
|
|
|
<!-- 展开折叠按钮 -->
|
|
|
|
<u-icon :name="collapsed ? 'arrow-up' : 'arrow-down'"></u-icon>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view v-show="collapsed" class="mt-1">
|
|
|
|
<!-- 提交人和时间信息 -->
|
|
|
|
<view class="text-gray-400 text-xs">
|
|
|
|
上传人:<text class="mr-4" v-if="deliverData.submitMemberName">{{ deliverData.submitMemberName }}</text>
|
|
|
|
上传时间:
|
|
|
|
<text v-if="deliverData.submitTime"> {{ dayjs(+deliverData.submitTime).format('MM-DD HH:mm') }}</text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 提交的链接信息 -->
|
|
|
|
<DeliverLink :link="deliverData.details[0]" v-if="deliverData.details && deliverData.details[0]" />
|
|
|
|
|
|
|
|
<!-- 审核人 标题 -->
|
|
|
|
<view class="text-gray-400 flex justify-between mt-3">
|
|
|
|
<text>审核</text>
|
|
|
|
<text class="text-blue-400 text-xs" @click="openMoreRecords">更多记录</text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 审核人 列表 -->
|
|
|
|
<view v-if="deliverData.checkerList">
|
|
|
|
<!-- 遍历审核人信息 -->
|
|
|
|
<view class="mt-2 text-sm flex justify-between" v-for="item in deliverData.checkerList">
|
|
|
|
<view>
|
|
|
|
<view class="font-semibold">{{ item.checkerName }}</view>
|
|
|
|
<view class="text-xs text-gray-400">{{ item.remark }}</view>
|
|
|
|
<view class="text-xs text-gray-400" v-if="+item.checkTime > 0">{{ dayjs(+item.checkTime).format('MM-DD HH:mm') }}</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 不是自己 显示审核状态 -->
|
|
|
|
<view v-show="item.isMine !== 1" class="text-xs">
|
|
|
|
<text v-if="item.status === 1" class="text-green-600"> 已通过 </text>
|
|
|
|
<text v-else-if="item.status === 2" class="text-red-600"> 已驳回 </text>
|
|
|
|
<text v-else class="text-gray-400"> 待审核 </text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 自己是当前审核人 且未审核状态 -->
|
|
|
|
<view v-show="item.isMine === 1 && item.status === null">
|
|
|
|
<u-button size="mini" shape="circle" class="mr-4 h-1-4 leading-1-4" type="primary" @click="checkModal.mode = 'RESOLVE'">
|
|
|
|
通过
|
|
|
|
</u-button>
|
|
|
|
<u-button size="mini" shape="circle" class="h-1-4 leading-1-4" type="error" @click="checkModal.mode = 'REJECT'">
|
|
|
|
驳回
|
|
|
|
</u-button>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 自己是审核人 且审核过 当前审核人的审核状态并展示得分情况 -->
|
|
|
|
<view v-show="item.isMine === 1 && item.status !== null" class="text-xs">
|
|
|
|
<view class="mb-1">
|
|
|
|
<text v-if="item.status === 1" class="text-green-600"> 已通过 </text>
|
|
|
|
<text v-else-if="item.status === 2" class="text-red-600"> 已驳回 </text>
|
|
|
|
</view>
|
|
|
|
<zwp-ring-timing mode="chart" :value="item.score" active-color="#F59E0B" radius="30" bar-width="4" v-if="item.score !== null">
|
|
|
|
<text class="text-yellow-500 font-medium">{{ item.score }}</text>
|
|
|
|
</zwp-ring-timing>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<checkFormModal :data="checkModal" @hide="checkModal.mode = 'HIDE'" @submit-end="$emit('check-success')" />
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref, reactive, inject } from 'vue';
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
import checkFormModal from './check-form-modal.vue';
|
|
|
|
|
|
|
|
const deliverData = inject('deliver');
|
|
|
|
defineEmits(['check-success']);
|
|
|
|
const collapsed = ref(false);
|
|
|
|
|
|
|
|
const checkModal = reactive({
|
|
|
|
mode: 'HIDE', // HIDE->隐藏 RESOLVE->通过 REJECT->驳回
|
|
|
|
deliverRecordId: () => (deliverData.value ? deliverData.value.deliverRecordId : ''), // 交付物记录id
|
|
|
|
});
|
|
|
|
|
|
|
|
// 跳转到审核记录页面
|
|
|
|
function openMoreRecords() {
|
|
|
|
const { deliverRecordId } = deliverData.value;
|
|
|
|
uni.navigateTo({ url: `/pages/checkLog/checkLog?deliverRecordId=${deliverRecordId}` });
|
|
|
|
}
|
|
|
|
</script>
|