领用申请接口调试完成
This commit is contained in:
parent
c536630a1b
commit
3dfe48ecce
|
|
@ -19,16 +19,16 @@ export function getReceiveApplyDetailsApi(query) {
|
|||
// 获取审核记录详情
|
||||
export function getAuditingDetailsApi(query) {
|
||||
return request({
|
||||
url: '/material//sysWorkflowNode/listByTaskId',
|
||||
url: '/material/sysWorkflowNode/listByTaskId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 审核提交接口
|
||||
export function submitAuditingApi(query) {
|
||||
export function submitAuditingApi(data) {
|
||||
return request({
|
||||
url: '/material/ma_type/getMaTypeTreeSelect',
|
||||
method: 'get',
|
||||
params: query
|
||||
url: '/material/sysWorkflowRecordHistory/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ export function getReceiveApplyDetailsApi(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
// 获取减免申请记录详情
|
||||
// 获取减免申请审核记录详情
|
||||
export function getAuditingDetailsApi(query) {
|
||||
return request({
|
||||
url: '/material//sysWorkflowNode/listByTaskId',
|
||||
url: '/material/sysWorkflowNode/listByTaskId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
|
|||
const buildPayload = ({ loginMethod, username, password, uuid, code, mobile, verificationCode, phoneUuid }) => {
|
||||
let loginType = ''
|
||||
if (loginMethod === 'mobile') {
|
||||
loginType = phonePattern.test(mobile.trim()) ? 'PHONE_OTP' : emailPattern.test(mobile.trim()) ? 'EMAIL_OTP' : 'PHONE_OTP'
|
||||
loginType = phonePattern.test(mobile.trim())
|
||||
? 'PHONE_OTP'
|
||||
: emailPattern.test(mobile.trim())
|
||||
? 'EMAIL_OTP'
|
||||
: 'PHONE_OTP'
|
||||
return {
|
||||
username: mobile.trim(),
|
||||
verificationCode,
|
||||
|
|
@ -19,7 +23,11 @@ const buildPayload = ({ loginMethod, username, password, uuid, code, mobile, ver
|
|||
phoneUuid
|
||||
}
|
||||
} else {
|
||||
loginType = phonePattern.test(username.trim()) ? 'PHONE_PASSWORD' : emailPattern.test(username.trim()) ? 'EMAIL_PASSWORD' : 'USERNAME_PASSWORD'
|
||||
loginType = phonePattern.test(username.trim())
|
||||
? 'PHONE_PASSWORD'
|
||||
: emailPattern.test(username.trim())
|
||||
? 'EMAIL_PASSWORD'
|
||||
: 'USERNAME_PASSWORD'
|
||||
return {
|
||||
username: username.trim(),
|
||||
password,
|
||||
|
|
@ -90,7 +98,7 @@ const user = {
|
|||
commit('SET_TOKEN', access_token)
|
||||
setExpiresIn(expires_in)
|
||||
commit('SET_EXPIRES_IN', expires_in)
|
||||
return res;
|
||||
return res
|
||||
})
|
||||
.catch(error => Promise.reject(error))
|
||||
},
|
||||
|
|
@ -120,6 +128,9 @@ const user = {
|
|||
commit('SET_ID', user.userId)
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
|
||||
// 存取用户的userId
|
||||
sessionStorage.setItem('userId', res.user.userId)
|
||||
return res
|
||||
})
|
||||
.catch(error => Promise.reject(error))
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@
|
|||
<TitleTip :title="`附件信息`" />
|
||||
|
||||
<div class="file-box">
|
||||
<div v-for="i in 2" :key="i">附件{{ i }}</div>
|
||||
<!-- <div v-for="i in 2" :key="i">附件{{ i }}</div> -->
|
||||
|
||||
暂无附件
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
@ -86,22 +88,32 @@
|
|||
<el-tag size="mini" type="success" v-if="step.isAccept === 1">已通过</el-tag>
|
||||
<el-tag size="mini" type="danger" v-if="step.isAccept === 2">已驳回</el-tag>
|
||||
</div>
|
||||
|
||||
<div class="node-info" v-if="step.createTime">
|
||||
审核时间:
|
||||
{{ step.createTime }}
|
||||
</div>
|
||||
|
||||
<div class="node-info" v-if="step.remark">
|
||||
审核意见:
|
||||
{{ step.remark }}
|
||||
</div>
|
||||
</template>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
|
||||
<div class="auditing-container">
|
||||
<div class="auditing-container" v-if="pagesType === 1">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="opinion"
|
||||
v-model="auditingParams.remark"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||
/>
|
||||
|
||||
<el-row class="btn-container">
|
||||
<el-button type="success" size="mini" @click="onSubmitPass">通过</el-button>
|
||||
<el-button type="danger" size="mini" @click="onSubmitReject">驳回</el-button>
|
||||
<el-button type="success" size="mini" @click="onHandleAuditing(1)">通过</el-button>
|
||||
<el-button type="danger" size="mini" @click="onHandleAuditing(2)">驳回</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -130,21 +142,68 @@ export default {
|
|||
],
|
||||
active: 1,
|
||||
detailsList: [],
|
||||
auditingList: []
|
||||
auditingList: [],
|
||||
userId: '',
|
||||
auditingParams: {
|
||||
recordId: '',
|
||||
nodeId: '', // 当前审核记录的id
|
||||
nextNodeId: '', // 下个流程节点ID
|
||||
isAccept: '', // 审批结果 1. 通过 2. 驳回
|
||||
remark: '', // 审核意见
|
||||
typeId: '', // 当前审核记录中的 typeId
|
||||
taskId: '' // 外层列表的taskId
|
||||
},
|
||||
pagesType: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 判断当前路由页面是否有查询参数
|
||||
if (this.$route.query) {
|
||||
const { id, taskId } = this.$route.query
|
||||
const { id, taskId, type } = this.$route.query
|
||||
this.auditingParams.taskId = taskId
|
||||
this.pagesType = type
|
||||
this.getLeaseTaskDetailFun(id, taskId)
|
||||
}
|
||||
|
||||
this.userId = sessionStorage.getItem('userId')
|
||||
},
|
||||
methods: {
|
||||
// 通过
|
||||
onSubmitPass() {},
|
||||
// 驳回
|
||||
onSubmitReject() {},
|
||||
// 通过 或 驳回
|
||||
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 { 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)
|
||||
console.log(res, '提交结果')
|
||||
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('审核成功')
|
||||
setTimeout(() => {
|
||||
const obj = { path: '/business-examine/receive-apply' }
|
||||
this.$tab.closeOpenPage(obj)
|
||||
}, 500)
|
||||
}
|
||||
|
||||
console.log(this.auditingParams, ' this.auditingParams组装好的参数')
|
||||
},
|
||||
|
||||
// 获取数据详情 和 审核记录详情
|
||||
async getLeaseTaskDetailFun(id, taskId) {
|
||||
const { data: res } = await getLeaseTaskDetail(id)
|
||||
|
|
@ -255,4 +314,9 @@ export default {
|
|||
color: #303133;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.node-info {
|
||||
padding: 6px 0;
|
||||
color: #ccc;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -91,19 +91,23 @@
|
|||
<!-- 操作 -->
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-search" @click="handleAuditing(scope.row, 1)">
|
||||
审核
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.taskStatus == '0'"
|
||||
v-if="scope.row.taskStatus != 2"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
@click="handleDelete(scope.row)"
|
||||
icon="el-icon-edit"
|
||||
@click="handleAuditing(scope.row, 1)"
|
||||
>
|
||||
删除
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.taskStatus == 2"
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-search"
|
||||
@click="handleAuditing(scope.row, 2)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -226,7 +230,8 @@ export default {
|
|||
name: 'receive-apply-details',
|
||||
query: {
|
||||
id: row.id,
|
||||
taskId: row.taskId
|
||||
taskId: row.taskId,
|
||||
type
|
||||
}
|
||||
}) // 跳转审核详情页面
|
||||
},
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
</el-table>
|
||||
<div class="total-amount">
|
||||
<span>合计:</span>
|
||||
<span>{{ totalAmount }} / 元</span>
|
||||
<span>{{ totalAmount.toFixed(2) }} / 元</span>
|
||||
</div>
|
||||
<TitleTip :title="`附件信息`" />
|
||||
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<div class="auditing-container">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="opinion"
|
||||
v-model="auditingParams.remark"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||
/>
|
||||
|
|
@ -132,7 +132,6 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
opinion: '',
|
||||
detailsInfo: {},
|
||||
content: `<span style="color:red">测试996</span>`,
|
||||
steps: [
|
||||
|
|
@ -144,7 +143,15 @@ export default {
|
|||
detailsList: [],
|
||||
auditingList: [],
|
||||
fileList: [],
|
||||
totalAmount: 0
|
||||
totalAmount: 0,
|
||||
auditingParams: {
|
||||
nodeId: '', // 当前审核记录的id
|
||||
nextNodeId: '', // 下个流程节点ID
|
||||
isAccept: '', // 审批结果 1. 通过 2. 驳回
|
||||
remark: '', // 审核意见
|
||||
typeId: '', // 当前审核记录中的 typeId
|
||||
taskId: '' // 外层列表的taskId
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -156,7 +163,10 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
// 通过
|
||||
onSubmitPass() {},
|
||||
onSubmitPass() {
|
||||
// 组装参数
|
||||
const auditingParams = {}
|
||||
},
|
||||
// 驳回
|
||||
onSubmitReject() {},
|
||||
// 获取数据详情 和 审核记录详情
|
||||
|
|
|
|||
Loading…
Reference in New Issue