代码优化
This commit is contained in:
parent
8835cb8906
commit
fb62df9086
|
|
@ -230,6 +230,14 @@ export function getAUditingProcessApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 月计划-查看数据-审核流程
|
||||||
|
export function getAUditingProcessProApi(data) {
|
||||||
|
return request_yn({
|
||||||
|
url: '/ynPlanApp/proMonth/getCheckDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 月计划-上报人-获取审核人信息
|
// 月计划-上报人-获取审核人信息
|
||||||
export function getAUditingUserInfoApi(data) {
|
export function getAUditingUserInfoApi(data) {
|
||||||
return request_yn({
|
return request_yn({
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ import {
|
||||||
getRiskLevelListApi,
|
getRiskLevelListApi,
|
||||||
getControlLevelListApi,
|
getControlLevelListApi,
|
||||||
updateInfPlanContentProApi,
|
updateInfPlanContentProApi,
|
||||||
getAUditingProcessApi,
|
getAUditingProcessProApi,
|
||||||
getAUditingUserInfoApi,
|
getAUditingUserInfoApi,
|
||||||
// setMonthPlanApi,
|
// setMonthPlanApi,
|
||||||
setAuditingRejectProApi
|
setAuditingRejectProApi
|
||||||
|
|
@ -537,7 +537,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// console.log('paramsparams参数', params)
|
// console.log('paramsparams参数', params)
|
||||||
const res = await getAUditingProcessApi(this.params)
|
const res = await getAUditingProcessProApi(this.params)
|
||||||
console.log('res审核流程', res)
|
console.log('res审核流程', res)
|
||||||
|
|
||||||
res.obj.forEach(e => {
|
res.obj.forEach(e => {
|
||||||
|
|
|
||||||
|
|
@ -189,13 +189,13 @@ import {
|
||||||
updateInfPlanContentProApi,
|
updateInfPlanContentProApi,
|
||||||
getAUditingUserInfoApi,
|
getAUditingUserInfoApi,
|
||||||
setMonthPlanProApi,
|
setMonthPlanProApi,
|
||||||
getAUditingProcessApi
|
getAUditingProcessProApi
|
||||||
} from '../../../api/workPlan/monthPlan'
|
} from '../../../api/workPlan/monthPlan'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
monthDetailsList: [],
|
monthDetailsList: [],
|
||||||
|
proId: '',
|
||||||
editDisabled: false,
|
editDisabled: false,
|
||||||
state: '',
|
state: '',
|
||||||
month: '',
|
month: '',
|
||||||
|
|
@ -540,6 +540,34 @@ export default {
|
||||||
},
|
},
|
||||||
/* 确定 */
|
/* 确定 */
|
||||||
async onHandlerSubmit() {
|
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 => {
|
const ids = this.auditingUserList.map(e => {
|
||||||
if (e.isChecked) return e.id
|
if (e.isChecked) return e.id
|
||||||
})
|
})
|
||||||
|
|
@ -547,14 +575,16 @@ export default {
|
||||||
let idsStr = ids.filter(e => e != null).join(',')
|
let idsStr = ids.filter(e => e != null).join(',')
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
id: JSON.stringify(this.monthDetailsList),
|
id: this.proId,
|
||||||
user: idsStr,
|
user: idsStr
|
||||||
state: '2'
|
// state: '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('saveParams保存参数', params)
|
console.log('saveParams保存参数', params)
|
||||||
|
|
||||||
const result = await setMonthPlanProApi(params)
|
const result = await setMonthPlanProApi(params)
|
||||||
|
|
||||||
|
console.log(result, 'results上报人提交结果')
|
||||||
if (result.res == 1) {
|
if (result.res == 1) {
|
||||||
uni.showToast({ title: `提交成功!`, icon: 'none' })
|
uni.showToast({ title: `提交成功!`, icon: 'none' })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -577,7 +607,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('paramsparams参数', params)
|
console.log('paramsparams参数', params)
|
||||||
const res = await getAUditingProcessApi(params)
|
const res = await getAUditingProcessProApi(params)
|
||||||
console.log('res审核流程', res)
|
console.log('res审核流程', res)
|
||||||
|
|
||||||
res.obj.forEach(e => {
|
res.obj.forEach(e => {
|
||||||
|
|
@ -664,11 +694,13 @@ export default {
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.state = options.state
|
this.state = options.state
|
||||||
this.month = options.month
|
this.month = options.month
|
||||||
|
this.proId = options.id
|
||||||
console.log('options.state', options.state, options.month)
|
console.log('options.state', options.state, options.month)
|
||||||
Promise.all([this.getRiskLevelListData(), this.getControlLevelListData()]).then(res => {
|
Promise.all([this.getRiskLevelListData(), this.getControlLevelListData()]).then(res => {
|
||||||
this.params.id = options.id
|
this.params.id = options.id
|
||||||
this.getPlanDetailData()
|
this.getPlanDetailData()
|
||||||
})
|
})
|
||||||
|
this.getAUditingProcessData()
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue