123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="">
- <navbar :config="config" backColor="#999999"></navbar>
- <view class="task-audit">
- <template v-if="TaskInfo">
- <view class="task-title">
- {{TaskInfo.childTaskTitle}}
- </view>
- <view class="task-explain">
- {{TaskInfo.childTaskRemark}}
- </view>
- <share :sharePoster="mainTask.sharePoster" :taskId="mainTask.taskId" />
- <taskContent v-if="mainTask">
- <view class="task-info-item">
- <text class="task-info-title">任务时间:</text>
- <text class="task-info-val">{{mainTask.startTime}} - {{mainTask.endTime}}</text>
- </view>
- <view class="task-info-item">
- <text class="task-info-title">任务领取后完成时间:</text>
- <text class="task-info-val">{{mainTask.completionDays}}天</text>
- </view>
- <view class="task-info-item">
- <text class="task-info-title">任务奖励:</text>
- <text class="task-info-val task-info-integral">{{mainTask.rewardPoints}}积分</text>
- </view>
- </taskContent>
- </template>
- <template v-if="TaskInfo">
- <view class="task-title-2">
- 审核信息
- </view>
- <taskContent>
- <view class="task-info-item">
- <text class="task-info-title">提交时间:</text>
- <text class="task-info-val">{{ TaskInfo.submitTime }}</text>
- </view>
- <view class="task-info-item">
- <text class="task-info-title">审核状态:</text>
- <text class="task-info-val">{{$TaskStatusText(TaskInfo.checkStatus)}}</text>
- </view>
- <view class="task-info-item" v-if="TaskInfo.checkStatus === 2">
- <text class="task-info-title">驳回原因:</text>
- <text class="task-info-val">{{ TaskInfo.rejectReason }}</text>
- </view>
- </taskContent>
- </template>
- </view>
- <template v-if="TaskInfo">
- <task-bottom-btn v-if="TaskInfo.checkStatus === 3" btnName="去查看"
- @onClick="onSubmit(mainTask.taskType , true )" />
- <task-bottom-btn v-if="[0,1,2].includes(TaskInfo.checkStatus)" btnName="去提交"
- @onClick="onSubmit(mainTask.taskType, false )" />
- </template>
- </view>
- </template>
- <script>
- import share from "./components/share.vue"
- import taskContent from "./components/task-content.vue"
- import taskBottomBtn from "./components/task-bottom-btn.vue"
- import {
- getMyTaskInfo_Api,
- getMyMoreTaskInfo_Api,
- onSubmitCheck_Api
- } from "@/api/task.js"
- import {
- onSubmint_val
- } from "./task_common.js"
- export default {
- components: {
- share,
- taskContent,
- taskBottomBtn
- },
- data() {
- return {
- config: {
- back: true,
- title: '审核详情',
- color: 'black',
- backgroundColor: [1, '#fff'],
- statusBarFontColor: 'black'
- },
- mainTask: null, // 主任务
- TaskInfo: null, // 子任务
- receiveTaskId: null, // 单任务审核详情
- receiveChildTaskId: null,
- }
- },
- onLoad(opt) {
- this.receiveTaskId = opt.receiveTaskId;
- this.receiveChildTaskId = opt.receiveChildTaskId;
- this.init();
- },
- methods: {
- init() {
- if (this.receiveTaskId) {
- this.getMyTaskInfo()
- }
- if (this.receiveChildTaskId) {
- this.getMyMoreTaskInfo()
- }
- },
- // 查询单任务详情
- getMyTaskInfo() {
- getMyTaskInfo_Api(this.receiveTaskId || this.receiveChildTaskId).then(res => {
- const childTask = res.data ? res.data.childTaskVoList[0] : null
- this.mainTask = res.data;
- if (childTask) {
- this.TaskInfo = childTask;
- this.TaskRule = childTask.childTaskRule || null
- };
- })
- },
- // 多任务
- getMyMoreTaskInfo() {
- getMyMoreTaskInfo_Api(this.receiveChildTaskId).then(res => {
- const childTask = res.data || null
- this.TaskInfo = childTask;
- this.mainTask = childTask.myTaskVo;
- this.TaskRule = childTask?.childTaskRule || null
- console.log(this.TaskInfo, '------TaskInfo--------')
- })
- },
- onSubmit(type, checkPage = false, page = 'submitDetails') {
- const taskInfo = this.TaskInfo;
- onSubmint_val(type, taskInfo, checkPage, page)
- },
- // onSubmit(type) {
- // onSubmit(type, checkPage = false) {
- // const taskInfo = this.taskInfo.childTaskVoList[0];
- // onSubmint_val(type, taskInfo, checkPage)
- // }
- // // onSubmitCheck_Api(this.TaskInfo.receiveChildTaskId).then(res => {
- // // let path = '/pages/task/submit-task';
- // // if (type === 0) {
- // // // 单任务提交
- // // path = `${path}?receiveTaskId=${this.receiveTaskId}`
- // // } else {
- // // // 多任务下子任务提交
- // // path = `${path}?receiveChildTaskId=${this.TaskInfo.receiveChildTaskId}`
- // // };
- // // uni.navigateTo({
- // // url: path
- // // })
- // // })
- // },
- onExamine() {
- let path = '/pages/task/submit-task';
- if (type === 0) {
- // 单任务提交
- path = `${path}?receiveTaskId=${this.receiveTaskId}`
- } else {
- // 多任务下子任务提交
- path = `${path}?receiveChildTaskId=${this.TaskInfo.receiveChildTaskId}`
- };
- uni.navigateTo({
- url: path
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "./common.scss";
- .task-audit {
- padding: 0 30rpx;
- }
- </style>
|