|
|
|
@ -6,15 +6,15 @@ |
|
|
|
<!-- <u-badge :is-dot="true" is-center></u-badge> --> |
|
|
|
{{ nameRef }} |
|
|
|
</span> |
|
|
|
<u-icon :name=" iconRef ? 'arrow-right' : 'arrow-down' " ></u-icon> |
|
|
|
<u-icon :name="iconRef ? 'arrow-right' : 'arrow-down'"></u-icon> |
|
|
|
</view> |
|
|
|
<view class="p-3 pt-0" v-show="iconRef"> |
|
|
|
<!-- 提交人和时间信息 --> |
|
|
|
<view class="text-gray-400"> |
|
|
|
<span class="mr-2">{{ submitter }}</span> <span> {{ dayjs(+timeRef).format('MM-DD HH:mm') }}</span> |
|
|
|
<span class="mr-2">{{ submitter }}</span> <span> {{ dayjs(+timeRef).format('MM-DD HH:mm') }}</span> |
|
|
|
</view> |
|
|
|
<!-- 提交的链接信息 --> |
|
|
|
<view class="w-64 break-all text-blue-400 py-2"> {{linkRef}} </view> |
|
|
|
<view class="w-64 break-all text-blue-400 py-2"> {{ linkRef }} </view> |
|
|
|
<!-- 审核人信息 --> |
|
|
|
<view class="text-gray-400 flex justify-between"> |
|
|
|
<span>审核</span> |
|
|
|
@ -24,27 +24,27 @@ |
|
|
|
<!-- 遍历审核人信息 --> |
|
|
|
<view class="mt-3 text-sm flex justify-between" v-for="item in checkerList"> |
|
|
|
<view> |
|
|
|
<view>{{item.checkerName}}</view> |
|
|
|
<view class="my-1">{{item.remark}}</view> |
|
|
|
<view class="my-1" v-if="item.checkTime > 0">{{dayjs(+item.checkTime).format('MM-DD HH:mm')}}</view> |
|
|
|
<view>{{ item.checkerName }}</view> |
|
|
|
<view class="my-1">{{ item.remark }}</view> |
|
|
|
<view class="my-1" v-if="item.checkTime > 0">{{ dayjs(+item.checkTime).format('MM-DD HH:mm') }}</view> |
|
|
|
</view> |
|
|
|
<view v-show="item.isMine !== 1">{{item.status == null ? '待审核': item.status == '1' ? '已通过':'已驳回'}}</view> |
|
|
|
<view v-show="item.isMine !== 1">{{ item.status == null ? '待审核' : item.status == '1' ? '已通过' : '已驳回' }}</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="approved">通过</u-button> |
|
|
|
<u-button size="mini" shape="circle" class="h-1-4 leading-1-4" type="error" @click="rebut">驳回</u-button> |
|
|
|
</view> |
|
|
|
<!-- 当前审核人的审核状态并展示得分情况 --> |
|
|
|
<view v-show="item.isMine === 1 && item.status !== null" class="text-sm"> |
|
|
|
<view v-show="item.isMine === 1 && item.status !== null" class="text-sm"> |
|
|
|
<view> |
|
|
|
{{item.status == '1' ? '已通过':'已驳回'}} |
|
|
|
{{ item.status == '1' ? '已通过' : '已驳回' }} |
|
|
|
</view> |
|
|
|
<view v-if="item.score > 0"> |
|
|
|
<u-circle-progress active-color="#FA8C16" :percent="item.score" width="90" border-width="7" class="mt-2"> |
|
|
|
<view class="u-progress-content"> |
|
|
|
<view class="progressDot text-white text-center">{{item.score}}</view> |
|
|
|
</view> |
|
|
|
</u-circle-progress> |
|
|
|
<u-circle-progress active-color="#FA8C16" :percent="item.score" width="90" border-width="7" class="mt-2"> |
|
|
|
<view class="u-progress-content"> |
|
|
|
<view class="progress-dot text-white text-center">{{ item.score }}</view> |
|
|
|
</view> |
|
|
|
</u-circle-progress> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -65,15 +65,16 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<textarea class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md" |
|
|
|
placeholder="请输入通过建议" |
|
|
|
maxlength="30" |
|
|
|
v-model="adviceRef" |
|
|
|
<textarea |
|
|
|
class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md" |
|
|
|
placeholder="请输入通过建议" |
|
|
|
maxlength="30" |
|
|
|
v-model="adviceRef" |
|
|
|
></textarea> |
|
|
|
<view class="common-list"> |
|
|
|
<view v-for="item in commonWords" class="h-12 leading-12 w-62 mx-5" @click="adviceRef = item"> |
|
|
|
{{item}} |
|
|
|
</view> |
|
|
|
{{ item }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex justify-around h-12 mt-7 justify-self-stretch box-modal-border"> |
|
|
|
@ -91,15 +92,16 @@ |
|
|
|
<!-- 通过modal的标题 --> |
|
|
|
<view class="text-center my-6 font-semibold"> 审核驳回 </view> |
|
|
|
<view> |
|
|
|
<textarea class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md" |
|
|
|
placeholder="请输入通过建议" |
|
|
|
maxlength="30" |
|
|
|
v-model="rebutRef" |
|
|
|
<textarea |
|
|
|
class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md" |
|
|
|
placeholder="请输入通过建议" |
|
|
|
maxlength="30" |
|
|
|
v-model="rebutRef" |
|
|
|
></textarea> |
|
|
|
<view class="common-list"> |
|
|
|
<view v-for="item in rebutWords" class="h-12 leading-12 w-62 mx-5" @click="rebutRef = item"> |
|
|
|
{{item}} |
|
|
|
</view> |
|
|
|
{{ item }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex justify-around h-12 mt-7 justify-self-stretch box-modal-border"> |
|
|
|
@ -114,9 +116,10 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { ref} from 'vue'; |
|
|
|
import { ref, computed } from 'vue'; |
|
|
|
import { useStore } from 'vuex'; |
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
|
|
|
const props = defineProps({ task: { type: Object, default: () => {} } }); |
|
|
|
const store = useStore(); |
|
|
|
|
|
|
|
@ -124,31 +127,31 @@ const nameRef = ref('入职插件V0.8原型输出'); |
|
|
|
const iconRef = ref(false); |
|
|
|
const submitter = ref('黛西'); |
|
|
|
const timeRef = ref(''); |
|
|
|
const linkRef = ref('') |
|
|
|
const approvedModal = ref(false); //审核通过的modal |
|
|
|
const rebutModal = ref(false) //审核驳回的modal |
|
|
|
const score = ref(1); //分数 |
|
|
|
const adviceRef = ref('') // 审核通过的审批语 |
|
|
|
const rebutRef = ref('') // 审核驳回的审批语 |
|
|
|
const commonWords = ['加油,再接再厉!','很棒!','不错,很详细!','加油,再接再厉'] // 审核通过常用的审批语 |
|
|
|
const rebutWords = ['不详细','还有需要改进的地方','驳回审批1','驳回审批2'] //审核驳回常用的审批语 |
|
|
|
const checkerList = ref([]) |
|
|
|
const linkRef = ref(''); |
|
|
|
const approvedModal = ref(false); // 审核通过的modal |
|
|
|
const rebutModal = ref(false); // 审核驳回的modal |
|
|
|
const score = ref(1); // 分数 |
|
|
|
const adviceRef = ref(''); // 审核通过的审批语 |
|
|
|
const rebutRef = ref(''); // 审核驳回的审批语 |
|
|
|
const commonWords = ['加油,再接再厉!', '很棒!', '不错,很详细!', '加油,再接再厉']; // 审核通过常用的审批语 |
|
|
|
const rebutWords = ['不详细', '还有需要改进的地方', '驳回审批1', '驳回审批2']; // 审核驳回常用的审批语 |
|
|
|
const checkerList = ref([]); |
|
|
|
|
|
|
|
// 获取到当前的用户信息 |
|
|
|
const member = store.state.role.members.filter(item => item.isMine === 1); |
|
|
|
// 交付物记录id |
|
|
|
const deliverRecordId = computed(() => store.state.deliver.deliverRecordId); |
|
|
|
|
|
|
|
// 获取当前审核信息 |
|
|
|
|
|
|
|
(async function getDeliverList(){ |
|
|
|
const param = { taskId:props.task.id} |
|
|
|
const data = await uni.$u.api.getDeliverByTaskId(param); |
|
|
|
// console.log(data) |
|
|
|
linkRef.value = data.details[0] |
|
|
|
timeRef.value = data.submitTime |
|
|
|
nameRef.value = data.deliverName |
|
|
|
checkerList.value = data.checkerList |
|
|
|
console.log(checkerList.value) |
|
|
|
})(); |
|
|
|
(async function getDeliverList() { |
|
|
|
const param = { taskId: props.task.id }; |
|
|
|
const data = await uni.$u.api.getDeliverByTaskId(param); |
|
|
|
// console.log(data) |
|
|
|
linkRef.value = data.details[0]; |
|
|
|
timeRef.value = data.submitTime; |
|
|
|
nameRef.value = data.deliverName; |
|
|
|
checkerList.value = data.checkerList; |
|
|
|
console.log(checkerList.value); |
|
|
|
}()); |
|
|
|
|
|
|
|
// 通过的按钮事件 |
|
|
|
async function approved() { |
|
|
|
@ -156,52 +159,49 @@ async function approved() { |
|
|
|
} |
|
|
|
// 驳回的按钮事件 |
|
|
|
function rebut() { |
|
|
|
rebutModal.value = true |
|
|
|
rebutModal.value = true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 审核通过发送相关请求 |
|
|
|
function confirmAdvice(){ |
|
|
|
function confirmAdvice() { |
|
|
|
// TODO:发送请求 |
|
|
|
// console.log('确定') |
|
|
|
try { |
|
|
|
try { |
|
|
|
const param = { |
|
|
|
projectId: store.state.project.project.id, |
|
|
|
deliverRecordId:store.state.project.deliverRecordId, |
|
|
|
type:1, |
|
|
|
remark:adviceRef.value, |
|
|
|
score:score.value |
|
|
|
} |
|
|
|
uni.$u.api.checkDeliver(param) |
|
|
|
deliverRecordId: deliverRecordId.value, |
|
|
|
type: 1, |
|
|
|
remark: adviceRef.value, |
|
|
|
score: score.value, |
|
|
|
}; |
|
|
|
uni.$u.api.checkDeliver(param); |
|
|
|
} catch (error) { |
|
|
|
console.log('error: ', error); |
|
|
|
console.log('error: ', error); |
|
|
|
} |
|
|
|
approvedModal.value = false |
|
|
|
approvedModal.value = false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 审核驳回发送相关请求 |
|
|
|
function confirmReject(){ |
|
|
|
function confirmReject() { |
|
|
|
// TODO:发送请求 |
|
|
|
try { |
|
|
|
try { |
|
|
|
const param = { |
|
|
|
projectId: store.state.project.project.id, |
|
|
|
deliverRecordId:store.state.project.deliverRecordId, |
|
|
|
type:2, |
|
|
|
remark:rebutRef.value, |
|
|
|
score:'' |
|
|
|
} |
|
|
|
uni.$u.api.checkDeliver(param) |
|
|
|
deliverRecordId: deliverRecordId.value, |
|
|
|
type: 2, |
|
|
|
remark: rebutRef.value, |
|
|
|
score: '', |
|
|
|
}; |
|
|
|
uni.$u.api.checkDeliver(param); |
|
|
|
} catch (error) { |
|
|
|
console.log('error: ', error); |
|
|
|
console.log('error: ', error); |
|
|
|
} |
|
|
|
rebutModal.value = false |
|
|
|
rebutModal.value = false; |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
.progressDot { |
|
|
|
.progress-dot { |
|
|
|
width: 50rpx; |
|
|
|
height: 50rpx; |
|
|
|
border-radius: 50%; |
|
|
|
|