2024-07-05 18:01:23 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
|
|
|
|
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
|
|
|
|
|
<u-list-item v-for="(item, index) in list" :key="index">
|
|
|
|
|
<view class="flex-between main-title">
|
2024-07-08 17:59:08 +08:00
|
|
|
|
<text>申请人:{{ item.jobName }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>作业编号:{{ item.id }}</text>
|
2024-07-05 18:01:23 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
2024-07-09 13:36:05 +08:00
|
|
|
|
<text>作业分公司:{{ item.corpName }}</text>
|
2024-07-05 18:01:23 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
2024-07-09 13:36:05 +08:00
|
|
|
|
<text>申请时间:{{ item.createdTime }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>当前步骤:{{ item.taskName }}</text>
|
2024-07-05 18:01:23 +08:00
|
|
|
|
</view>
|
2024-09-23 17:55:04 +08:00
|
|
|
|
<view class=" mt-10 flex_btn">
|
|
|
|
|
|
|
|
|
|
<view class="flex_btn">
|
2024-08-30 14:53:23 +08:00
|
|
|
|
<u-button type="primary" text="修改" size="mini" class="bth-mini" v-if="item.canEditFlag === '1'" @click="handleEditTask(item)" />
|
2024-09-23 17:55:04 +08:00
|
|
|
|
<u-button type="primary" text="流程" size="mini" class="bth-mini ml-10"
|
2024-07-05 18:01:23 +08:00
|
|
|
|
@click="$u.route({
|
|
|
|
|
url: '/pages/eight_assignments/technological_process',
|
|
|
|
|
params: {taskId:item.taskId,type,title}
|
|
|
|
|
})"/>
|
2024-08-30 14:53:23 +08:00
|
|
|
|
<u-button type="primary" text="审批" size="mini" class="bth-mini ml-10" v-if="item.canEditFlag !== '1'"
|
2024-07-05 18:01:23 +08:00
|
|
|
|
@click="$u.route({
|
|
|
|
|
url: '/pages/eight_assignments/view_info',
|
2024-07-08 17:59:08 +08:00
|
|
|
|
params: {taskId:item.taskId,jobId:item.jobId,type,title}
|
2024-07-05 18:01:23 +08:00
|
|
|
|
})"/>
|
|
|
|
|
</view>
|
2024-09-23 17:55:04 +08:00
|
|
|
|
<view v-for="(item1, index1) in item.buttons" :key="index1" class="flex_btn">
|
|
|
|
|
<u-button type="primary" size="mini" shape="circle" :text="item1.name" class="bth-mini ml-10"
|
|
|
|
|
@click="$u.route({
|
2024-09-23 16:23:19 +08:00
|
|
|
|
url: item1.route,
|
2024-09-23 17:55:04 +08:00
|
|
|
|
params: {taskId: item.taskId,EW_RU_JOB_ID: item.jobId, isView: '1'},
|
2024-09-23 16:23:19 +08:00
|
|
|
|
})"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
2024-07-05 18:01:23 +08:00
|
|
|
|
</view>
|
|
|
|
|
</u-list-item>
|
|
|
|
|
</u-list>
|
|
|
|
|
<empty v-else></empty>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getToDoTaskList} from "@/api";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
type: '',
|
|
|
|
|
title: '',
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
totalPage: 0,
|
|
|
|
|
list: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(query) {
|
|
|
|
|
this.type = query.type
|
|
|
|
|
this.title = query.title
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: this.title + '待办'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.resetList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getData() {
|
|
|
|
|
let resData = await getToDoTaskList({
|
|
|
|
|
showCount: this.pageSize,
|
|
|
|
|
currentPage: this.currentPage,
|
2024-07-08 17:59:08 +08:00
|
|
|
|
TYPE: this.type,
|
2024-09-23 17:55:04 +08:00
|
|
|
|
vectors: '0',
|
|
|
|
|
REQUEST_SOURCE: '2'
|
2024-07-05 18:01:23 +08:00
|
|
|
|
});
|
|
|
|
|
this.list = [...this.list, ...resData.list.list];
|
|
|
|
|
this.totalPage = resData.list.totalPage;
|
|
|
|
|
},
|
|
|
|
|
resetList() {
|
|
|
|
|
this.pageSize = 10
|
|
|
|
|
this.currentPage = 1
|
|
|
|
|
this.list = []
|
|
|
|
|
this.getData()
|
|
|
|
|
},
|
|
|
|
|
scrolltolower() {
|
|
|
|
|
this.currentPage++;
|
|
|
|
|
if (this.totalPage >= this.currentPage) this.getData();
|
|
|
|
|
},
|
2024-08-29 18:02:20 +08:00
|
|
|
|
handleEditTask(value) {
|
|
|
|
|
let tempUrlStr = this.type.replace(/([a-z])([A-Z])/g, '\$1_\$2').toLowerCase()
|
|
|
|
|
uni.$u.route({
|
|
|
|
|
url: `/pages/eight_assignments/${tempUrlStr}/apply`,
|
2024-08-30 14:13:12 +08:00
|
|
|
|
params: { taskId: value.taskId, CORPINFO_ID: value.corpId }
|
2024-08-29 18:02:20 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
2024-07-05 18:01:23 +08:00
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2024-09-23 17:55:04 +08:00
|
|
|
|
.flex_btn{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
|
|
}
|
2024-07-05 18:01:23 +08:00
|
|
|
|
|
|
|
|
|
</style>
|