bug修复
This commit is contained in:
parent
eb2ae45acb
commit
4e058ebb9f
|
|
@ -127,7 +127,7 @@ export function getEquipmentThreeTypes(query) {
|
|||
export function getCode() {
|
||||
return request({
|
||||
url: '/material/leaseTask/getCode',
|
||||
method: 'get',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ export function deleteRedif(id) {
|
|||
}
|
||||
|
||||
// 直转审核-列表
|
||||
export function getDerateList(query) {
|
||||
export function getDirectAuditListApi(query) {
|
||||
return request({
|
||||
url: '/material/directAudit/list',
|
||||
method: 'get',
|
||||
|
|
@ -206,7 +206,7 @@ export function auditDir(data) {
|
|||
export function getLeaseTask(id) {
|
||||
return request({
|
||||
url: '/material/leaseTask/' + id,
|
||||
method: 'get',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,34 +1,35 @@
|
|||
<template>
|
||||
<!-- 基础页面 -->
|
||||
<!-- 直转审核页面 -->
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" inline>
|
||||
<el-form-item label="申请日期" prop="timeRange">
|
||||
<el-date-picker
|
||||
v-model="queryParams.timeRange"
|
||||
clearable
|
||||
type="daterange"
|
||||
v-model="timeRange"
|
||||
range-separator="至"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 240px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
placeholder="请输入关键字"
|
||||
v-model="queryParams.keyWord"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in statusOptions"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
|
||||
<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
|
||||
type="index"
|
||||
width="55"
|
||||
|
|
@ -51,7 +52,7 @@
|
|||
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
|
||||
/>
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
|
|
@ -69,12 +70,11 @@
|
|||
<!-- 操作 -->
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="text" size="mini" icon="el-icon-search" @click="handleEdit(scope.row, 1)">查看</el-button> -->
|
||||
<el-button
|
||||
v-if="auditingShow(scope.row)"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
v-if="auditingShow(scope.row)"
|
||||
@click="handleEdit(scope.row, 2)"
|
||||
>
|
||||
审核
|
||||
|
|
@ -84,8 +84,8 @@
|
|||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-search"
|
||||
v-if="scope.row.flowStatus == 2 || scope.row.flowStatus == 3"
|
||||
@click="handleEdit(scope.row, 1)"
|
||||
v-if="scope.row.flowStatus == 2 || scope.row.flowStatus == 3"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
|
|
@ -95,27 +95,30 @@
|
|||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-show="total > 0"
|
||||
@pagination="getList"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getReceiveList, receiveDelete, getDerateList } from '@/api/business/index'
|
||||
import { getDirectAuditListApi } from '@/api/business/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userId: '',
|
||||
timeRange: [],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: '', // 关键字
|
||||
status: '', // 审核状态
|
||||
timeRange: [] // 日期范围
|
||||
status: '' // 审核状态
|
||||
},
|
||||
// 状态
|
||||
statusOptions: [
|
||||
|
|
@ -132,12 +135,8 @@ export default {
|
|||
{ label: '转出工程', prop: 'backProName' },
|
||||
{ label: '转入单位', prop: 'leaseUnitName' },
|
||||
{ label: '转入工程', prop: 'leaseProName' },
|
||||
// { label: '物资类型', prop: 'typeName' },
|
||||
{ label: '状态', prop: 'flowStatus' }
|
||||
],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
userId: ''
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -151,6 +150,7 @@ export default {
|
|||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.timeRange = []
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.pageSize = 10
|
||||
this.$refs.queryForm.resetFields()
|
||||
|
|
@ -158,30 +158,25 @@ export default {
|
|||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
console.log('列表-查询', this.queryParams)
|
||||
try {
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.timeRange[0] || '',
|
||||
endTime: this.queryParams.timeRange[1] || ''
|
||||
startTime: this.timeRange[0] || '',
|
||||
endTime: this.timeRange[1] || ''
|
||||
}
|
||||
const res = await getDerateList(params)
|
||||
console.log('🚀 ~ 获取列表 ~ res:', res)
|
||||
const res = await getDirectAuditListApi(params)
|
||||
this.tableList = res.rows
|
||||
this.total = res.total || 0
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ 获取列表 ~ error:', error)
|
||||
this.tableList = []
|
||||
this.total = 0
|
||||
}
|
||||
},
|
||||
// 多选
|
||||
selectionChange(val) {
|
||||
console.log('selectionChange', val)
|
||||
},
|
||||
selectionChange(val) {},
|
||||
// 编辑
|
||||
handleEdit(row, type) {
|
||||
console.log('编辑', row)
|
||||
// ----type---- 1. 查看 2. 审核
|
||||
// 跳转审核详情页面
|
||||
this.$router.push({
|
||||
name: 'direct-rotation-apply',
|
||||
|
|
@ -194,27 +189,8 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
console.log('删除', row)
|
||||
this.$confirm('是否删除该数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const res = await receiveDelete(row.id)
|
||||
console.log('🚀 ~ 删除 ~ res:', res)
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 判断审核按钮显示隐藏
|
||||
auditingShow(row) {
|
||||
console.log('row.configValues', row.configValue)
|
||||
|
||||
if (row.configValue) {
|
||||
return (row.flowStatus == 1 || row.flowStatus == 0) && row.configValue.includes(this.userId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<!-- 领用审核详情 -->
|
||||
<div class="business-details-container">
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
|
|
@ -190,37 +191,6 @@ export default {
|
|||
this.$tab.closeOpenPage(obj)
|
||||
}, 500)
|
||||
}
|
||||
|
||||
// // 组装参数
|
||||
|
||||
// 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]
|
||||
|
||||
// // if (isAccept !== 0) {
|
||||
// // this.$modal.msgError('当前已审核,不可重复审核')
|
||||
// // return
|
||||
// // }
|
||||
// Object.assign(this.auditingParams, {
|
||||
// typeId,
|
||||
// recordId,
|
||||
// nodeId: id
|
||||
// })
|
||||
// this.auditingParams.isAccept = type
|
||||
// if (currentIndex !== this.auditingList.length - 1) {
|
||||
// this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id
|
||||
// }
|
||||
|
||||
// const res = await submitAuditingApi(this.auditingParams)
|
||||
|
||||
// if (res.code === 200) {
|
||||
// this.$modal.msgSuccess('审核成功')
|
||||
// setTimeout(() => {
|
||||
// const obj = { path: '/business-examine/receive-apply' }
|
||||
// this.$tab.closeOpenPage(obj)
|
||||
// }, 500)
|
||||
// }
|
||||
},
|
||||
|
||||
// 获取数据详情 和 审核记录详情
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
<template>
|
||||
<!-- 业务办理审核 -- 领料审核 -->
|
||||
<!-- 业务办理审核 -- 领用审核 -->
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" inline>
|
||||
<el-form-item label="申请日期" prop="timeRange">
|
||||
<el-date-picker
|
||||
clearable
|
||||
type="daterange"
|
||||
style="width: 240px"
|
||||
range-separator="至"
|
||||
value-format="yyyy-MM-dd"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
v-model="queryParams.timeRange"
|
||||
v-model="timeRange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
|
|
@ -40,7 +41,7 @@
|
|||
</el-form>
|
||||
|
||||
<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
|
||||
width="55"
|
||||
type="index"
|
||||
|
|
@ -106,23 +107,23 @@ import { getReceiveApplyApi } from '@/api/receive-apply/index.js'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
total: 0, // 总条数
|
||||
userId: '',
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
timeRange: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: '', // 关键字
|
||||
taskStatus: '', // 审核状态
|
||||
timeRange: [] // 日期范围
|
||||
taskStatus: '' // 审核状态
|
||||
},
|
||||
// 考勤状态
|
||||
// 审核状态
|
||||
statusOptions: [
|
||||
{ label: '待审核', value: '1' },
|
||||
{ label: '审核中', value: '2' },
|
||||
{ label: '已完成', value: '3' }
|
||||
],
|
||||
total: 0, // 总条数
|
||||
// 表头
|
||||
tableColumns: [
|
||||
{ label: '申请时间', prop: 'createTime' },
|
||||
|
|
@ -149,6 +150,7 @@ export default {
|
|||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.timeRange = []
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.pageSize = 10
|
||||
this.$refs.queryForm.resetFields()
|
||||
|
|
@ -159,8 +161,8 @@ export default {
|
|||
try {
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.timeRange[0] || '',
|
||||
endTime: this.queryParams.timeRange[1] || ''
|
||||
startTime: this.timeRange[0] || '',
|
||||
endTime: this.timeRange[1] || ''
|
||||
}
|
||||
const res = await getReceiveApplyApi(params)
|
||||
this.tableList = res.data.rows
|
||||
|
|
@ -174,8 +176,10 @@ export default {
|
|||
selectionChange(val) {
|
||||
console.log('selectionChange', val)
|
||||
},
|
||||
// 审核按钮 / 查看
|
||||
// 操作按钮
|
||||
handleAuditing(row, type) {
|
||||
// ----type---- 1. 查看 2. 审核
|
||||
// 跳转审核详情页面
|
||||
this.$router.push({
|
||||
name: 'receive-apply-details',
|
||||
query: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue