2024-07-05 18:01:23 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
2024-07-08 17:59:08 +08:00
|
|
|
|
<view class="card">
|
|
|
|
|
<u-cell-group>
|
2024-09-13 16:41:36 +08:00
|
|
|
|
<view v-for="(item, index) in form" :key="index">
|
|
|
|
|
<u-cell v-if="item.TYPE === 0" :title="item.ITEM" :value="item.ITEM_VALUE"></u-cell>
|
|
|
|
|
<view v-if="item.TYPE === 1">
|
|
|
|
|
<u-cell :title="item.ITEM">
|
|
|
|
|
<template #label>
|
|
|
|
|
<view class="mt-5">
|
|
|
|
|
<view v-for="(item1, index1) in item.list" :key="index1">
|
|
|
|
|
<u-image
|
|
|
|
|
width="400rpx"
|
|
|
|
|
height="200rpx"
|
|
|
|
|
:src="$filePath + item1.ITEM_VALUE"
|
|
|
|
|
mode="widthFix"
|
2024-12-03 16:00:16 +08:00
|
|
|
|
@click="fnPreviewImage($filePath + item1.ITEM_VALUE)"
|
2024-09-13 16:41:36 +08:00
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</u-cell>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="item.TYPE === 3">
|
|
|
|
|
<u-divider text-position="left" :text="item.ITEM" />
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="item.TYPE === 4">
|
|
|
|
|
<view v-for="(item1, index1) in item.list" :key="index1">
|
|
|
|
|
<view v-for="(item2, index2) in item1.list" :key="index2">
|
|
|
|
|
<u-cell :title="item2.ITEM" :value="item2.ITEM_VALUE" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="item.TYPE === 5">
|
|
|
|
|
<u-cell :title="item.ITEM">
|
|
|
|
|
<template #label>
|
|
|
|
|
<view class="mt-5">
|
|
|
|
|
<u-image
|
|
|
|
|
width="400rpx"
|
|
|
|
|
height="200rpx"
|
|
|
|
|
:src="$filePath + item.ITEM_VALUE"
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</u-cell>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-07-08 17:59:08 +08:00
|
|
|
|
</u-cell-group>
|
2024-07-11 18:04:46 +08:00
|
|
|
|
<u-divider text="安全措施" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
|
|
|
|
<u-cell-group>
|
|
|
|
|
<u-cell v-for="(item,index) in questionnaires" :key="index" :title="item.QUESTION">
|
2024-07-12 16:24:51 +08:00
|
|
|
|
<template #title>
|
|
|
|
|
<view style="display: flex;justify-content: space-between">
|
2024-09-06 11:55:21 +08:00
|
|
|
|
<view style="width: 75%;">{{ item.QUESTION }}</view>
|
2024-07-12 16:24:51 +08:00
|
|
|
|
<view>{{ item.TEXT_INFO || item.ANSWER }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<template #label>
|
|
|
|
|
<block v-for="(item1,index1) in item.answers" :key="index1">
|
|
|
|
|
<view>{{ item1.TEXT_INFO }}:{{ item1.ANSWER }}</view>
|
|
|
|
|
</block>
|
|
|
|
|
</template>
|
2024-07-11 18:04:46 +08:00
|
|
|
|
</u-cell>
|
|
|
|
|
</u-cell-group>
|
|
|
|
|
<u-divider text="审批人员" textPosition="left" textColor="#3c9cff" lineColor="#3c9cff"/>
|
2024-07-08 17:59:08 +08:00
|
|
|
|
<u-cell-group>
|
2024-08-29 16:19:09 +08:00
|
|
|
|
<block v-for="(item, index) in jobs" :key="index">
|
2024-07-09 13:36:05 +08:00
|
|
|
|
<u-cell :key="index" :title="item.TYPE_DESCRIBE">
|
|
|
|
|
<template #label>
|
|
|
|
|
<view class="mt-10">
|
2024-07-11 18:04:46 +08:00
|
|
|
|
<view>部门:{{ item.DEPARTMENT_NAME }}</view>
|
2024-11-22 15:24:40 +08:00
|
|
|
|
<view v-if="item.USER_NAME">人员:{{ item.USER_NAME }}</view>
|
2024-07-09 13:36:05 +08:00
|
|
|
|
<view v-if="item.SIGN_PICTURE">
|
|
|
|
|
<u-image width="400rpx" height="200rpx" :src="$filePath + '/' +item.SIGN_PICTURE" mode="widthFix"/>
|
2024-07-11 18:04:46 +08:00
|
|
|
|
<view>审批意见:{{ item.APPROVAL_OPINIONS }}</view>
|
|
|
|
|
<view>审批意见:{{ item.APPROVAL_TIME }}</view>
|
2024-07-09 13:36:05 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</u-cell>
|
2024-07-08 17:59:08 +08:00
|
|
|
|
</block>
|
|
|
|
|
</u-cell-group>
|
|
|
|
|
<view class="mt-10">
|
2024-11-04 11:34:13 +08:00
|
|
|
|
<u-button v-if="isView !== '1'" type="primary" text="下一步" @click="$u.debounce(fnSubmit, 1000,true)"/>
|
|
|
|
|
<u-button v-if="isView === '1'" type="primary" text="返 回" @click="$u.debounce(goBack, 1000,true)"/>
|
2024-07-08 17:59:08 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-07-05 18:01:23 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getTaskInfo} from "@/api";
|
2024-07-08 17:59:08 +08:00
|
|
|
|
import {resolveNextOperation} from "@/utils/submitHomeworkProcess";
|
2024-07-05 18:01:23 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
2024-07-08 17:59:08 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
taskId: '',
|
|
|
|
|
type: '',
|
|
|
|
|
jobId: '',
|
|
|
|
|
form: [],
|
2024-07-11 18:04:46 +08:00
|
|
|
|
jobs: [],
|
|
|
|
|
questionnaires: [],
|
2024-11-04 11:34:13 +08:00
|
|
|
|
isView: ''
|
2024-07-08 17:59:08 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-05 18:01:23 +08:00
|
|
|
|
onLoad(query) {
|
2024-07-08 17:59:08 +08:00
|
|
|
|
this.taskId = query.taskId
|
|
|
|
|
this.type = query.type
|
|
|
|
|
this.jobId = query.jobId
|
2024-11-04 11:34:13 +08:00
|
|
|
|
if ('1' === query.isView){
|
|
|
|
|
this.isView = '1'
|
|
|
|
|
}
|
2024-07-05 18:01:23 +08:00
|
|
|
|
this.fnGetData(query.taskId)
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: query.title + '查看'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async fnGetData(taskId) {
|
|
|
|
|
let resData = await getTaskInfo({EW_RU_TASK_ID: taskId})
|
2024-09-13 16:41:36 +08:00
|
|
|
|
this.form = resData.list.fromTrans
|
2024-07-09 13:36:05 +08:00
|
|
|
|
this.jobs = resData.list.jobs
|
2024-07-12 16:24:51 +08:00
|
|
|
|
this.questionnaires = resData.list.simpleQues[0]
|
2024-07-08 17:59:08 +08:00
|
|
|
|
},
|
|
|
|
|
async fnSubmit() {
|
2024-07-09 18:01:48 +08:00
|
|
|
|
let CORP_ID = ''
|
|
|
|
|
for (let i = 0; i < this.form.length; i++) {
|
2024-07-11 18:04:46 +08:00
|
|
|
|
if (this.form[i].FK_NAME === 'CORP_ID') {
|
2024-07-09 18:01:48 +08:00
|
|
|
|
CORP_ID = this.form[i].FK_VALUE
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-08 17:59:08 +08:00
|
|
|
|
await resolveNextOperation({
|
|
|
|
|
EW_RU_TASK_ID: this.taskId,
|
|
|
|
|
TYPE: this.type,
|
2024-07-09 18:01:48 +08:00
|
|
|
|
CORP_ID,
|
2024-07-08 17:59:08 +08:00
|
|
|
|
EW_RU_JOB_ID: this.jobId,
|
|
|
|
|
})
|
2024-07-12 16:24:51 +08:00
|
|
|
|
},
|
2024-11-04 11:34:13 +08:00
|
|
|
|
goBack(){
|
|
|
|
|
uni.navigateBack()
|
2024-12-03 16:00:16 +08:00
|
|
|
|
},
|
|
|
|
|
fnPreviewImage(src){
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
urls: [src],
|
|
|
|
|
current: src,
|
|
|
|
|
});
|
2024-11-04 11:34:13 +08:00
|
|
|
|
}
|
2024-07-05 18:01:23 +08:00
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|