代码优化

This commit is contained in:
BianLzhaoMin 2024-11-11 17:27:05 +08:00
parent 8835cb8906
commit fb62df9086
3 changed files with 48 additions and 8 deletions

View File

@ -230,6 +230,14 @@ export function getAUditingProcessApi(data) {
data: data
})
}
// 月计划-查看数据-审核流程
export function getAUditingProcessProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getCheckDetail',
method: 'post',
data: data
})
}
// 月计划-上报人-获取审核人信息
export function getAUditingUserInfoApi(data) {
return request_yn({

View File

@ -210,7 +210,7 @@ import {
getRiskLevelListApi,
getControlLevelListApi,
updateInfPlanContentProApi,
getAUditingProcessApi,
getAUditingProcessProApi,
getAUditingUserInfoApi,
// setMonthPlanApi,
setAuditingRejectProApi
@ -537,7 +537,7 @@ export default {
// }
// console.log('paramsparams', params)
const res = await getAUditingProcessApi(this.params)
const res = await getAUditingProcessProApi(this.params)
console.log('res审核流程', res)
res.obj.forEach(e => {

View File

@ -189,13 +189,13 @@ import {
updateInfPlanContentProApi,
getAUditingUserInfoApi,
setMonthPlanProApi,
getAUditingProcessApi
getAUditingProcessProApi
} from '../../../api/workPlan/monthPlan'
export default {
data() {
return {
monthDetailsList: [],
proId: '',
editDisabled: false,
state: '',
month: '',
@ -540,6 +540,34 @@ export default {
},
/* 确定 */
async onHandlerSubmit() {
// const ids = this.auditingUserList.map(e => {
// if (e.isChecked) return e.id
// })
// let idsStr = ids.filter(e => e != null).join(',')
// const params = {
// id: JSON.stringify(this.monthDetailsList),
// user: idsStr,
// state: '2'
// }
// console.log('saveParams', params)
// const result = await setMonthPlanProApi(params)
// if (result.res == 1) {
// uni.showToast({ title: ``, icon: 'none' })
// setTimeout(() => {
// uni.navigateBack({
// delta: 1,
// success() {
// uni.$emit('update')
// }
// })
// }, 500)
// } else {
// uni.showToast({ title: ``, icon: 'none' })
// }
const ids = this.auditingUserList.map(e => {
if (e.isChecked) return e.id
})
@ -547,14 +575,16 @@ export default {
let idsStr = ids.filter(e => e != null).join(',')
const params = {
id: JSON.stringify(this.monthDetailsList),
user: idsStr,
state: '2'
id: this.proId,
user: idsStr
// state: '2'
}
console.log('saveParams保存参数', params)
const result = await setMonthPlanProApi(params)
console.log(result, 'results上报人提交结果')
if (result.res == 1) {
uni.showToast({ title: `提交成功!`, icon: 'none' })
setTimeout(() => {
@ -577,7 +607,7 @@ export default {
}
console.log('paramsparams参数', params)
const res = await getAUditingProcessApi(params)
const res = await getAUditingProcessProApi(params)
console.log('res审核流程', res)
res.obj.forEach(e => {
@ -664,11 +694,13 @@ export default {
onLoad(options) {
this.state = options.state
this.month = options.month
this.proId = options.id
console.log('options.state', options.state, options.month)
Promise.all([this.getRiskLevelListData(), this.getControlLevelListData()]).then(res => {
this.params.id = options.id
this.getPlanDetailData()
})
this.getAUditingProcessData()
},
onReady() {
let that = this