Commit 5842a2df authored by 刘怀志's avatar 刘怀志

feat(审批详情): 审批详情接口对接1

parent 7e9c6402
import request from '@/utils/request' import request from '@/utils/request'
const ProcessGroupEnum = {
/**
* 单据类型 AE
*/
AE:'1',
/**
* 单据类型 MC
*/
MC: '2',
/**
* 单据类型 DC
*/
DC: '3'
}
/** /**
* Ae流程实例 - 分页查询 * Ae流程实例 - 分页查询
* @param query * @param query
...@@ -24,3 +39,48 @@ export function queryInstanceByPage(params) { ...@@ -24,3 +39,48 @@ export function queryInstanceByPage(params) {
params params
}) })
} }
/**
* 流程实例 - 获取详情
* @param instanceId
* @returns {*}
*/
export function getProcessNodeByInstanceId(instanceId) {
return request({
url: `/sysprocessbasic/getProcessNode/${instanceId}`,
method: 'get'
})
}
/**
* 管理员审批
* @param query
* @returns {*}
*/
export function approveByAdmin(query) {
// 需要根据传回的url判断是哪个接口
const { url } = query
if (query.processGroup === ProcessGroupEnum.MC) {
return MCService({
url: url,
method: 'post',
params: query
})
} else if (query.processGroup === ProcessGroupEnum.DC) {
return DCService({
url: url,
method: 'post',
params: query
})
} else {
return request({
url: url,
method: 'post',
params: query
})
}
}
export function getProcessInstanceStatus(instanceId) {
return request({
url: `/sysprocessbasic/getProcessInstanceStatus/${instanceId}`,
method: 'get'
})
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:scroll-with-animation="true"> :scroll-with-animation="true">
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff"> <view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<!-- 原消息卡片模板 --> <!-- 原消息卡片模板 -->
<view class="noticeCard" @click="goDetail"> <view class="noticeCard" @click="goDetail(item.businessId,item.processType,item.status === '10' && item.allowApprove)">
<view class="noticeTop"> <view class="noticeTop">
<view class="titleClass"> <view class="titleClass">
<img :src="leftIconTwo" /> <img :src="leftIconTwo" />
...@@ -115,6 +115,7 @@ export default { ...@@ -115,6 +115,7 @@ export default {
rows: 10, rows: 10,
mesType: '1', mesType: '1',
processGroup: '1', processGroup: '1',
completeStatus: false
}, },
defaultPageSize: 10, defaultPageSize: 10,
// 底部加载 // 底部加载
...@@ -145,9 +146,9 @@ export default { ...@@ -145,9 +146,9 @@ export default {
}, },
}, },
methods: { methods: {
goDetail () { goDetail (processId,processType,status) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/approval_detail/baseDetail?id=1' url: `/pages/approval_detail/baseDetail?processId=${processId}&isView=0&status=${status}&processType=${processType}&label=${this.getLabelByValue(this.tableUserFormList, processType)}`
}) })
}, },
/** /**
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:scroll-with-animation="true"> :scroll-with-animation="true">
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff"> <view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff">
<!-- 原消息卡片模板 --> <!-- 原消息卡片模板 -->
<view class="noticeCard" @click="goDetail"> <view class="noticeCard" @click="goDetail(item.businessId,item.processType,item.status === '10' && item.allowApprove)">
<view class="noticeTop"> <view class="noticeTop">
<view class="titleClass"> <view class="titleClass">
<img :src="leftIconOne" /> <img :src="leftIconOne" />
...@@ -145,9 +145,9 @@ export default { ...@@ -145,9 +145,9 @@ export default {
}, },
}, },
methods: { methods: {
goDetail () { goDetail (processId,processType,status) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/approval_detail/baseDetail?id=1' url: `/pages/approval_detail/baseDetail?processId=${processId}&isView=1&status=${status}&processType=${processType}&label=${this.getLabelByValue(this.tableUserFormList, processType)}`
}) })
}, },
/** /**
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment