领用申请审核功能优化完善
This commit is contained in:
parent
a48d92859a
commit
c94d536c4f
|
|
@ -4,8 +4,8 @@
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<div class="left-container">
|
<div class="left-container">
|
||||||
<div class="pages-title">领用申请详情</div>
|
<div class="pages-title">领用申请详情</div>
|
||||||
<TitleTip :title="`基本信息`" />
|
|
||||||
|
|
||||||
|
<TitleTip :title="`基本信息`" />
|
||||||
<el-form size="small" style="padding: 20px" disabled label-width="120px" :model="detailsInfo">
|
<el-form size="small" style="padding: 20px" disabled label-width="120px" :model="detailsInfo">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -50,8 +50,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<TitleTip :title="`明细信息`" />
|
|
||||||
|
|
||||||
|
<TitleTip :title="`明细信息`" />
|
||||||
<el-table style="margin-top: 20px" :data="detailsList">
|
<el-table style="margin-top: 20px" :data="detailsList">
|
||||||
<el-table-column label="序号" align="center" width="80" type="index" />
|
<el-table-column label="序号" align="center" width="80" type="index" />
|
||||||
<el-table-column prop="maTypeName" label="类型名称" align="center" show-overflow-tooltip />
|
<el-table-column prop="maTypeName" label="类型名称" align="center" show-overflow-tooltip />
|
||||||
|
|
@ -60,13 +60,9 @@
|
||||||
<el-table-column prop="preNum" label="预领数量" align="center" show-overflow-tooltip />
|
<el-table-column prop="preNum" label="预领数量" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip />
|
<el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<TitleTip :title="`附件信息`" />
|
<TitleTip :title="`附件信息`" />
|
||||||
|
<div class="file-box">暂无附件</div>
|
||||||
<div class="file-box">
|
|
||||||
<!-- <div v-for="i in 2" :key="i">附件{{ i }}</div> -->
|
|
||||||
|
|
||||||
暂无附件
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
|
@ -82,7 +78,6 @@
|
||||||
<el-step v-for="step in auditingList" :key="step.id" :title="step.nodeName">
|
<el-step v-for="step in auditingList" :key="step.id" :title="step.nodeName">
|
||||||
<template slot="description">
|
<template slot="description">
|
||||||
<div class="custom-description">
|
<div class="custom-description">
|
||||||
<!-- {{ step.description }} -->
|
|
||||||
审核结果:
|
审核结果:
|
||||||
<el-tag size="mini" type="primary" v-if="step.isAccept === 0">待审批</el-tag>
|
<el-tag size="mini" type="primary" v-if="step.isAccept === 0">待审批</el-tag>
|
||||||
<el-tag size="mini" type="success" v-if="step.isAccept === 1">已通过</el-tag>
|
<el-tag size="mini" type="success" v-if="step.isAccept === 1">已通过</el-tag>
|
||||||
|
|
@ -106,8 +101,8 @@
|
||||||
<div class="auditing-container" v-if="pagesType === 1">
|
<div class="auditing-container" v-if="pagesType === 1">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="auditingParams.remark"
|
|
||||||
placeholder="请输入审核意见"
|
placeholder="请输入审核意见"
|
||||||
|
v-model="auditingParams.remark"
|
||||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -124,44 +119,39 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TitleTip from './components/title-tip.vue'
|
import TitleTip from './components/title-tip.vue'
|
||||||
import { submitAuditingApi, getAuditingDetailsApi } from '@/api/receive-apply/index.js'
|
|
||||||
import { getLeaseTaskDetail } from '@/api/business/index'
|
import { getLeaseTaskDetail } from '@/api/business/index'
|
||||||
|
import { submitAuditingApi, getAuditingDetailsApi } from '@/api/receive-apply/index.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
TitleTip
|
TitleTip
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
opinion: '',
|
|
||||||
detailsInfo: {},
|
|
||||||
content: `<span style="color:red">测试996</span>`,
|
|
||||||
steps: [
|
|
||||||
{ title: '步骤 1', description: '描述信息 1', color: 'red' },
|
|
||||||
{ title: '步骤 2', description: '描述信息 2', color: 'blue' },
|
|
||||||
{ title: '步骤 3', description: '描述信息 3', color: 'green' }
|
|
||||||
],
|
|
||||||
active: 1,
|
active: 1,
|
||||||
|
userId: '',
|
||||||
|
pagesType: 1,
|
||||||
|
currentNodeId: '',
|
||||||
|
detailsInfo: {},
|
||||||
detailsList: [],
|
detailsList: [],
|
||||||
auditingList: [],
|
auditingList: [],
|
||||||
userId: '',
|
|
||||||
auditingParams: {
|
auditingParams: {
|
||||||
recordId: '',
|
|
||||||
nodeId: '', // 当前审核记录的id
|
nodeId: '', // 当前审核记录的id
|
||||||
nextNodeId: '', // 下个流程节点ID
|
|
||||||
isAccept: '', // 审批结果 1. 通过 2. 驳回
|
|
||||||
remark: '', // 审核意见
|
remark: '', // 审核意见
|
||||||
typeId: '', // 当前审核记录中的 typeId
|
typeId: '', // 当前审核记录中的 typeId
|
||||||
taskId: '' // 外层列表的taskId
|
taskId: '', // 外层列表的taskId
|
||||||
},
|
isAccept: '', // 审批结果 1. 通过 2. 驳回
|
||||||
pagesType: 1
|
recordId: '',
|
||||||
|
nextNodeId: '' // 下个流程节点ID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 判断当前路由页面是否有查询参数
|
// 判断当前路由页面是否有查询参数
|
||||||
if (this.$route.query) {
|
if (this.$route.query) {
|
||||||
const { id, taskId, type } = this.$route.query
|
const { id, taskId, type, nodeId } = this.$route.query
|
||||||
this.auditingParams.taskId = taskId
|
this.auditingParams.taskId = taskId
|
||||||
this.pagesType = type
|
this.pagesType = type
|
||||||
|
this.currentNodeId = nodeId
|
||||||
this.getLeaseTaskDetailFun(id, taskId)
|
this.getLeaseTaskDetailFun(id, taskId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -171,8 +161,9 @@ export default {
|
||||||
// 通过 或 驳回
|
// 通过 或 驳回
|
||||||
async onHandleAuditing(type) {
|
async onHandleAuditing(type) {
|
||||||
// 组装参数
|
// 组装参数
|
||||||
const currentAuditing = this.auditingList.filter(e => e.configValues.includes(this.userId)) // 获取当前审核的节点
|
|
||||||
const currentIndex = this.auditingList.findIndex(e => e.configValues.includes(this.userId)) // 获取当前的索引
|
const currentAuditing = this.auditingList.filter(e => e.nodeId === this.currentNodeId) // 获取当前审核的节点
|
||||||
|
const currentIndex = this.auditingList.findIndex(e => e.nodeId === this.currentNodeId) // 获取当前的索引
|
||||||
|
|
||||||
const { recordId, id, typeId, isAccept } = currentAuditing[0]
|
const { recordId, id, typeId, isAccept } = currentAuditing[0]
|
||||||
|
|
||||||
|
|
@ -191,7 +182,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await submitAuditingApi(this.auditingParams)
|
const res = await submitAuditingApi(this.auditingParams)
|
||||||
console.log(res, '提交结果')
|
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('审核成功')
|
this.$modal.msgSuccess('审核成功')
|
||||||
|
|
@ -200,8 +190,6 @@ export default {
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.auditingParams, ' this.auditingParams组装好的参数')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取数据详情 和 审核记录详情
|
// 获取数据详情 和 审核记录详情
|
||||||
|
|
@ -213,7 +201,6 @@ export default {
|
||||||
|
|
||||||
const { rows: result } = await getAuditingDetailsApi({ taskId })
|
const { rows: result } = await getAuditingDetailsApi({ taskId })
|
||||||
this.auditingList = result
|
this.auditingList = result
|
||||||
console.log('result审核记录详情', result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,31 +4,30 @@
|
||||||
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline>
|
<el-form v-show="showSearch" :model="queryParams" ref="queryForm" size="small" inline>
|
||||||
<el-form-item label="申请日期" prop="timeRange">
|
<el-form-item label="申请日期" prop="timeRange">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.timeRange"
|
clearable
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
clearable
|
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
format="yyyy-MM-dd"
|
end-placeholder="结束日期"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
v-model="queryParams.timeRange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键字" prop="keyWord">
|
<el-form-item label="关键字" prop="keyWord">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.keyWord"
|
|
||||||
placeholder="请输入关键字"
|
|
||||||
clearable
|
clearable
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态" prop="taskStatus">
|
<el-form-item label="审核状态" prop="taskStatus">
|
||||||
<el-select v-model="queryParams.taskStatus" placeholder="请选择审核状态" clearable>
|
<el-select v-model="queryParams.taskStatus" placeholder="请选择审核状态" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusOptions"
|
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
v-for="item in statusOptions"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -40,35 +39,23 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">领料申请</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">
|
|
||||||
导出数据
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table :data="tableList" fit highlight-current-row style="width: 100%">
|
<el-table :data="tableList" fit highlight-current-row style="width: 100%">
|
||||||
<!-- 多选 -->
|
<!-- 多选 -->
|
||||||
<el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" />
|
<el-table-column type="selection" width="55" align="center" @selection-change="selectionChange" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
|
||||||
width="55"
|
width="55"
|
||||||
|
type="index"
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(column, index) in tableColumns"
|
|
||||||
show-overflow-tooltip
|
|
||||||
:key="column.prop"
|
|
||||||
:label="column.label"
|
|
||||||
:prop="column.prop"
|
|
||||||
align="center"
|
align="center"
|
||||||
|
:key="column.prop"
|
||||||
|
:prop="column.prop"
|
||||||
|
:label="column.label"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<!-- 插槽 -->
|
<!-- 插槽 -->
|
||||||
<template v-slot="scope" v-if="column.prop == 'taskStatus'">
|
<template v-slot="scope" v-if="column.prop == 'taskStatus'">
|
||||||
|
|
@ -81,19 +68,19 @@
|
||||||
<el-table-column label="操作" align="center" width="180">
|
<el-table-column label="操作" align="center" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.taskStatus != 2"
|
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
v-if="auditingShow(scope.row)"
|
||||||
@click="handleAuditing(scope.row, 1)"
|
@click="handleAuditing(scope.row, 1)"
|
||||||
>
|
>
|
||||||
审核
|
审核
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.taskStatus == 2"
|
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
v-if="scope.row.taskStatus == 2"
|
||||||
@click="handleAuditing(scope.row, 2)"
|
@click="handleAuditing(scope.row, 2)"
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -104,23 +91,24 @@
|
||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
:total="total"
|
||||||
|
v-show="total > 0"
|
||||||
|
@pagination="getList"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getLeaseTaskList, deleteLeaseTask } from '@/api/business/index'
|
|
||||||
import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
|
import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
|
||||||
|
import { getLeaseTaskList, deleteLeaseTask } from '@/api/business/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
userId: '',
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -143,7 +131,7 @@ export default {
|
||||||
{ label: '领用工程', prop: 'leaseProject' },
|
{ label: '领用工程', prop: 'leaseProject' },
|
||||||
{ label: '领料物资类型', prop: 'maTypeNames' },
|
{ label: '领料物资类型', prop: 'maTypeNames' },
|
||||||
{ label: '协议号', prop: 'agreementCode' },
|
{ label: '协议号', prop: 'agreementCode' },
|
||||||
{ label: '采购申请单号', prop: 'applyCode' },
|
{ label: '业务单号', prop: 'code' },
|
||||||
{ label: '领料人', prop: 'leasePerson' },
|
{ label: '领料人', prop: 'leasePerson' },
|
||||||
{ label: '领料人电话', prop: 'phone' },
|
{ label: '领料人电话', prop: 'phone' },
|
||||||
{ label: '状态', prop: 'taskStatus' }
|
{ label: '状态', prop: 'taskStatus' }
|
||||||
|
|
@ -153,6 +141,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.userId = sessionStorage.getItem('userId')
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -169,7 +158,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
async getList() {
|
async getList() {
|
||||||
console.log('列表-查询', this.queryParams)
|
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
|
|
@ -177,22 +165,9 @@ export default {
|
||||||
endTime: this.queryParams.timeRange[1] || ''
|
endTime: this.queryParams.timeRange[1] || ''
|
||||||
}
|
}
|
||||||
const res = await getReceiveApplyApi(params)
|
const res = await getReceiveApplyApi(params)
|
||||||
console.log('🚀 ~ 获取列表 ~ res:', res)
|
|
||||||
this.tableList = res.data.rows
|
this.tableList = res.data.rows
|
||||||
// this.tableList = [
|
|
||||||
// {
|
|
||||||
// createBy: '张麻子'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// createBy: '张麻子'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// createBy: '张麻子'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
this.total = res.data.total || 0
|
this.total = res.data.total || 0
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ 获取列表 ~ error:', error)
|
|
||||||
this.tableList = []
|
this.tableList = []
|
||||||
this.total = 0
|
this.total = 0
|
||||||
}
|
}
|
||||||
|
|
@ -207,20 +182,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 审核按钮
|
// 审核按钮
|
||||||
handleAuditing(row, type) {
|
handleAuditing(row, type) {
|
||||||
// console.log('编辑', row)
|
|
||||||
// let params = {}
|
|
||||||
// if (type === 1) {
|
|
||||||
// params = { type: 'detail', id: row.id }
|
|
||||||
// } else {
|
|
||||||
// params = { type: 'edit', id: row.id }
|
|
||||||
// }
|
|
||||||
// this.$router.push({ path: '/business/businessHandling/index', query: params })
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'receive-apply-details',
|
name: 'receive-apply-details',
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
taskId: row.taskId,
|
taskId: row.taskId,
|
||||||
type
|
type,
|
||||||
|
nodeId: row.nodeId
|
||||||
}
|
}
|
||||||
}) // 跳转审核详情页面
|
}) // 跳转审核详情页面
|
||||||
},
|
},
|
||||||
|
|
@ -252,6 +220,15 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('导出数据失败', error)
|
console.log('导出数据失败', error)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 判断审核按钮显示隐藏
|
||||||
|
auditingShow(row) {
|
||||||
|
console.log('row.configValues', row.configValue)
|
||||||
|
|
||||||
|
if (row.configValue) {
|
||||||
|
return row.status != 1 && row.configValue.includes(this.userId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue