2025-02-20 16:47:45 +08:00
|
|
|
<template>
|
2025-03-20 09:51:52 +08:00
|
|
|
<!-- 业务办理审核 -- 领用审核 -->
|
2025-02-20 16:47:45 +08:00
|
|
|
<div class="app-container">
|
2025-03-06 11:13:23 +08:00
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" inline>
|
2025-02-20 19:36:05 +08:00
|
|
|
<el-form-item label="申请日期" prop="timeRange">
|
|
|
|
|
<el-date-picker
|
2025-03-04 18:13:36 +08:00
|
|
|
clearable
|
2025-02-20 19:36:05 +08:00
|
|
|
type="daterange"
|
2025-03-20 09:51:52 +08:00
|
|
|
style="width: 240px"
|
2025-02-20 19:36:05 +08:00
|
|
|
range-separator="至"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
2025-03-04 18:13:36 +08:00
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
start-placeholder="开始日期"
|
2025-03-20 09:51:52 +08:00
|
|
|
v-model="timeRange"
|
2025-02-20 19:36:05 +08:00
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="关键字" prop="keyWord">
|
|
|
|
|
<el-input
|
|
|
|
|
clearable
|
2025-03-04 18:13:36 +08:00
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
v-model="queryParams.keyWord"
|
2025-02-20 16:47:45 +08:00
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2025-02-20 19:36:05 +08:00
|
|
|
<el-form-item label="审核状态" prop="taskStatus">
|
|
|
|
|
<el-select v-model="queryParams.taskStatus" placeholder="请选择审核状态" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
2025-03-04 18:13:36 +08:00
|
|
|
v-for="item in statusOptions"
|
2025-02-20 19:36:05 +08:00
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
2025-02-20 16:47:45 +08:00
|
|
|
|
2025-02-20 19:36:05 +08:00
|
|
|
<!-- 表单按钮 -->
|
2025-02-20 16:47:45 +08:00
|
|
|
<el-form-item>
|
2025-02-20 19:36:05 +08:00
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
2025-02-20 16:47:45 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
2025-02-20 19:36:05 +08:00
|
|
|
|
|
|
|
|
<el-table :data="tableList" fit highlight-current-row style="width: 100%">
|
2025-03-20 09:51:52 +08:00
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" /> -->
|
2025-02-20 16:47:45 +08:00
|
|
|
<el-table-column
|
2025-02-20 19:36:05 +08:00
|
|
|
width="55"
|
2025-03-04 18:13:36 +08:00
|
|
|
type="index"
|
2025-02-20 19:36:05 +08:00
|
|
|
label="序号"
|
2025-02-20 16:47:45 +08:00
|
|
|
align="center"
|
|
|
|
|
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
|
|
|
|
/>
|
2025-02-20 19:36:05 +08:00
|
|
|
<el-table-column
|
2025-03-04 18:13:36 +08:00
|
|
|
align="center"
|
2025-02-20 19:36:05 +08:00
|
|
|
:key="column.prop"
|
|
|
|
|
:prop="column.prop"
|
2025-03-04 18:13:36 +08:00
|
|
|
:label="column.label"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
v-for="column in tableColumns"
|
2025-02-20 19:36:05 +08:00
|
|
|
>
|
|
|
|
|
<!-- 插槽 -->
|
2025-03-06 11:13:23 +08:00
|
|
|
<template v-slot="{ row }" v-if="column.prop == 'taskStatus'">
|
|
|
|
|
<el-tag v-if="row.taskStatus == '1'" size="mini">审核中</el-tag>
|
|
|
|
|
<el-tag v-if="row.taskStatus == '0'" type="warning" size="mini">待审核</el-tag>
|
|
|
|
|
<el-tag v-if="row.taskStatus == '2'" type="success" size="mini">已完成</el-tag>
|
|
|
|
|
<el-tag v-if="row.taskStatus == '3'" type="danger" size="mini">已驳回</el-tag>
|
2025-02-20 16:47:45 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2025-02-20 19:36:05 +08:00
|
|
|
<!-- 操作 -->
|
2025-02-20 16:47:45 +08:00
|
|
|
<el-table-column label="操作" align="center" width="180">
|
2025-03-06 11:13:23 +08:00
|
|
|
<template slot-scope="{ row }">
|
2025-02-21 01:24:12 +08:00
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="el-icon-edit"
|
2025-03-06 11:13:23 +08:00
|
|
|
v-if="auditingShow(row)"
|
|
|
|
|
@click="handleAuditing(row, 1)"
|
2025-02-21 01:24:12 +08:00
|
|
|
>
|
2025-02-20 19:36:05 +08:00
|
|
|
审核
|
2025-02-20 16:47:45 +08:00
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
2025-02-20 19:36:05 +08:00
|
|
|
type="text"
|
2025-02-20 16:47:45 +08:00
|
|
|
size="mini"
|
2025-02-21 01:24:12 +08:00
|
|
|
icon="el-icon-search"
|
2025-03-06 11:13:23 +08:00
|
|
|
@click="handleAuditing(row, 2)"
|
2025-02-20 16:47:45 +08:00
|
|
|
>
|
2025-02-21 01:24:12 +08:00
|
|
|
查看
|
2025-02-20 16:47:45 +08:00
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
2025-02-20 19:36:05 +08:00
|
|
|
<!-- 分页 -->
|
2025-02-20 16:47:45 +08:00
|
|
|
<pagination
|
2025-02-20 19:36:05 +08:00
|
|
|
:total="total"
|
2025-03-04 18:13:36 +08:00
|
|
|
v-show="total > 0"
|
|
|
|
|
@pagination="getList"
|
2025-02-20 16:47:45 +08:00
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-02-20 21:50:29 +08:00
|
|
|
import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
|
2025-05-14 17:34:40 +08:00
|
|
|
import { getToken, setToken, setExpiresIn } from '@/utils/auth'
|
2025-02-20 19:36:05 +08:00
|
|
|
|
2025-02-20 16:47:45 +08:00
|
|
|
export default {
|
2025-05-14 09:31:18 +08:00
|
|
|
name: 'Receive-apply',
|
2025-02-20 16:47:45 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
2025-03-20 09:51:52 +08:00
|
|
|
total: 0, // 总条数
|
2025-03-04 18:13:36 +08:00
|
|
|
userId: '',
|
2025-03-06 11:13:23 +08:00
|
|
|
// 表格数据
|
|
|
|
|
tableList: [],
|
2025-03-20 09:51:52 +08:00
|
|
|
timeRange: [],
|
2025-02-20 16:47:45 +08:00
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
2025-02-20 19:36:05 +08:00
|
|
|
keyWord: '', // 关键字
|
2025-03-20 09:51:52 +08:00
|
|
|
taskStatus: '' // 审核状态
|
2025-02-20 16:47:45 +08:00
|
|
|
},
|
2025-03-20 09:51:52 +08:00
|
|
|
// 审核状态
|
2025-02-20 19:36:05 +08:00
|
|
|
statusOptions: [
|
2025-06-23 14:47:34 +08:00
|
|
|
{ label: '待审核', value: '0' },
|
|
|
|
|
{ label: '审核中', value: '1' },
|
|
|
|
|
{ label: '已完成', value: '2' },
|
|
|
|
|
{ label: '已驳回', value: '3' }
|
2025-02-20 19:36:05 +08:00
|
|
|
],
|
|
|
|
|
// 表头
|
|
|
|
|
tableColumns: [
|
|
|
|
|
{ label: '申请时间', prop: 'createTime' },
|
|
|
|
|
{ label: '申请人', prop: 'createBy' },
|
|
|
|
|
{ label: '领用单位', prop: 'leaseUnit' },
|
|
|
|
|
{ label: '领用工程', prop: 'leaseProject' },
|
|
|
|
|
{ label: '领料物资类型', prop: 'maTypeNames' },
|
|
|
|
|
{ label: '协议号', prop: 'agreementCode' },
|
2025-03-04 18:13:36 +08:00
|
|
|
{ label: '业务单号', prop: 'code' },
|
2025-02-20 19:36:05 +08:00
|
|
|
{ label: '领料人', prop: 'leasePerson' },
|
|
|
|
|
{ label: '领料人电话', prop: 'phone' },
|
|
|
|
|
{ label: '状态', prop: 'taskStatus' }
|
2025-03-06 11:13:23 +08:00
|
|
|
]
|
2025-02-20 16:47:45 +08:00
|
|
|
}
|
|
|
|
|
},
|
2025-05-14 17:34:40 +08:00
|
|
|
async created() {
|
|
|
|
|
const origin = window.location.href
|
|
|
|
|
console.log(origin.split('ticket')[1], 'origin')
|
|
|
|
|
const token = getToken()
|
|
|
|
|
console.log('🚀 ~ created ~ shh:', token)
|
|
|
|
|
|
|
|
|
|
if (origin.indexOf('ticket') != -1 && !token) {
|
|
|
|
|
this.isIws = true
|
|
|
|
|
const loading = this.$loading({
|
|
|
|
|
lock: true,
|
|
|
|
|
text: '登录中',
|
|
|
|
|
})
|
|
|
|
|
try {
|
|
|
|
|
const res = await iwsLogin({
|
|
|
|
|
ticket: origin.split('ticket%3D')[1].split('%26')[0] || origin.split('ticket=')[1].split('&')[0],
|
|
|
|
|
sysType: 0
|
|
|
|
|
})
|
|
|
|
|
console.log('🚀 ~ created ~ res:', res)
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
setToken(res.data.access_token)
|
|
|
|
|
this.$store.commit('SET_TOKEN', res.data.access_token)
|
|
|
|
|
setExpiresIn(1800)
|
|
|
|
|
this.$store.commit('SET_EXPIRES_IN', 1800)
|
|
|
|
|
}
|
|
|
|
|
// setExpiresIn(res.data.expires_in)
|
|
|
|
|
// this.$store.commit('SET_EXPIRES_IN', res.data.expires_in)
|
|
|
|
|
loading.close()
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
2025-05-16 11:56:35 +08:00
|
|
|
this.$router.push({ path: '/business-examine/receive-apply' })
|
|
|
|
|
// this.getList()
|
2025-05-14 17:34:40 +08:00
|
|
|
}, 300)
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log('🚀 ~ created ~ error:', error)
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '登录失败, 即将关闭页面',
|
|
|
|
|
type: 'error'
|
|
|
|
|
})
|
|
|
|
|
loading.close()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// 关闭窗口
|
|
|
|
|
window.close()
|
|
|
|
|
}, 1500)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.userId = sessionStorage.getItem('userId')
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
2025-02-20 16:47:45 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2025-02-20 19:36:05 +08:00
|
|
|
// 查询
|
2025-02-20 16:47:45 +08:00
|
|
|
handleQuery() {
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
// 重置
|
2025-02-20 19:36:05 +08:00
|
|
|
handleReset() {
|
2025-03-20 09:51:52 +08:00
|
|
|
this.timeRange = []
|
2025-02-20 16:47:45 +08:00
|
|
|
this.queryParams.pageNum = 1
|
|
|
|
|
this.queryParams.pageSize = 10
|
2025-02-20 19:36:05 +08:00
|
|
|
this.$refs.queryForm.resetFields()
|
|
|
|
|
this.getList()
|
2025-02-20 16:47:45 +08:00
|
|
|
},
|
2025-02-20 19:36:05 +08:00
|
|
|
// 获取列表
|
2025-02-20 16:47:45 +08:00
|
|
|
async getList() {
|
2025-02-20 19:36:05 +08:00
|
|
|
try {
|
|
|
|
|
const params = {
|
|
|
|
|
...this.queryParams,
|
2025-03-24 10:07:08 +08:00
|
|
|
startTime: this.timeRange ? this.timeRange[0] : '',
|
|
|
|
|
endTime: this.timeRange ? this.timeRange[1] : ''
|
2025-02-20 19:36:05 +08:00
|
|
|
}
|
2025-02-20 21:50:29 +08:00
|
|
|
const res = await getReceiveApplyApi(params)
|
2025-02-20 19:36:05 +08:00
|
|
|
this.tableList = res.data.rows
|
|
|
|
|
this.total = res.data.total || 0
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.tableList = []
|
|
|
|
|
this.total = 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 多选
|
|
|
|
|
selectionChange(val) {
|
|
|
|
|
console.log('selectionChange', val)
|
|
|
|
|
},
|
2025-03-20 09:51:52 +08:00
|
|
|
// 操作按钮
|
2025-02-20 19:36:05 +08:00
|
|
|
handleAuditing(row, type) {
|
2025-03-20 09:51:52 +08:00
|
|
|
// ----type---- 1. 查看 2. 审核
|
|
|
|
|
// 跳转审核详情页面
|
2025-02-20 21:50:29 +08:00
|
|
|
this.$router.push({
|
|
|
|
|
name: 'receive-apply-details',
|
|
|
|
|
query: {
|
|
|
|
|
id: row.id,
|
2025-02-21 01:24:12 +08:00
|
|
|
taskId: row.taskId,
|
2025-03-04 18:13:36 +08:00
|
|
|
type,
|
|
|
|
|
nodeId: row.nodeId
|
2025-02-20 21:50:29 +08:00
|
|
|
}
|
|
|
|
|
}) // 跳转审核详情页面
|
2025-02-20 16:47:45 +08:00
|
|
|
},
|
2025-03-04 18:13:36 +08:00
|
|
|
|
|
|
|
|
// 判断审核按钮显示隐藏
|
|
|
|
|
auditingShow(row) {
|
|
|
|
|
if (row.configValue) {
|
2025-03-06 16:57:53 +08:00
|
|
|
return (row.taskStatus == 1 || row.taskStatus == 0) && row.configValue.includes(this.userId)
|
2025-03-04 18:13:36 +08:00
|
|
|
}
|
2025-02-20 19:36:05 +08:00
|
|
|
}
|
2025-02-20 16:47:45 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2025-02-20 19:36:05 +08:00
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|