qa-prevention-xgf-app/pages/eight_assignments/view_info.vue

86 lines
2.4 KiB
Vue

<template>
<view class="content">
<view class="card">
<u-divider text="基本信息" textPosition="left"></u-divider>
<u-cell-group>
<block v-for="(item,index) in form">
<u-cell v-if="item.TYPE === 0" :key="index" :title="item.ITEM" :value="item.ITEM_VALUE"></u-cell>
</block>
</u-cell-group>
<u-divider text="审批人员" textPosition="left"></u-divider>
<u-cell-group>
<block v-for="(item,index) in jobs">
<u-cell :key="index" :title="item.TYPE_DESCRIBE">
<template #label>
<view class="mt-10">
<view>部门:{{item.DEPARTMENT_NAME}}</view>
<view>人员:{{item.USER_NAME}}</view>
<view v-if="item.SIGN_PICTURE">
<u-image width="400rpx" height="200rpx" :src="$filePath + '/' +item.SIGN_PICTURE" mode="widthFix"/>
<view>审批意见:{{item.APPROVAL_OPINIONS}}</view>
<view>审批意见:{{item.APPROVAL_TIME}}</view>
</view>
</view>
</template>
</u-cell>
</block>
</u-cell-group>
<view class="mt-10">
<u-button type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
</view>
</view>
</view>
</template>
<script>
import {getTaskInfo} from "@/api";
import {resolveNextOperation} from "@/utils/submitHomeworkProcess";
export default {
data() {
return {
taskId: '',
type: '',
jobId: '',
form: [],
jobs: []
}
},
onLoad(query) {
this.taskId = query.taskId
this.type = query.type
this.jobId = query.jobId
this.fnGetData(query.taskId)
uni.setNavigationBarTitle({
title: query.title + '查看'
})
},
methods: {
async fnGetData(taskId) {
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
this.form = resData.list.form
this.jobs = resData.list.jobs
},
async fnSubmit() {
let CORP_ID = ''
for (let i = 0; i < this.form.length; i++) {
if(this.form[i].FK_NAME === 'CORP_ID'){
CORP_ID = this.form[i].FK_VALUE
break
}
}
await resolveNextOperation({
EW_RU_TASK_ID: this.taskId,
TYPE: this.type,
CORP_ID,
EW_RU_JOB_ID: this.jobId,
})
}
},
}
</script>
<style scoped lang="scss">
</style>