This commit is contained in:
熊成强 2020-11-12 20:05:16 +08:00
parent fccbf2f07c
commit ebddabdc5a
2 changed files with 12 additions and 3 deletions

View File

@ -282,6 +282,7 @@ export default {
async cb (info) { async cb (info) {
const obj = {status: 8, menuName: '转交了', transferStaffId: info.value} const obj = {status: 8, menuName: '转交了', transferStaffId: info.value}
if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.info) obj.flowRecordId = this.info.flowRecordId
if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj) const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
if (res.code !== 200) { if (res.code !== 200) {

View File

@ -10,7 +10,7 @@
departmentName:obj.departmentName departmentName:obj.departmentName
}" /> }" />
<div class="performance-content-title-right"> <div class="performance-content-title-right">
<UseButton :formList='formList' :tableInfo.sync='tableInfo'/> <UseButton v-if="isShow" :flowRecordId='flowRecordId' :formList='formList' :tableInfo.sync='tableInfo'/>
</div> </div>
</div> </div>
<div class="performance-content-center"> <div class="performance-content-center">
@ -148,6 +148,8 @@ import tables from './components/table'
export default { export default {
data () { data () {
return { return {
isShow: false,
flowRecordId: '',
right: { right: {
showRight: false showRight: false
}, },
@ -198,6 +200,7 @@ export default {
this.right.showRight = false this.right.showRight = false
}, },
async handleList () { async handleList () {
this.isShow = false
let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id }) let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
this.handleGetTbale() this.handleGetTbale()
if (res.code !== 200) return this.$message.error(res.msg) if (res.code !== 200) return this.$message.error(res.msg)
@ -205,9 +208,14 @@ export default {
for (let i in res.data.flowRecordList) { for (let i in res.data.flowRecordList) {
arr.shift() arr.shift()
res.data.flowRecordList[i][arr.some(j => j.status === 1) ? 'isGou' : 'isActive'] = true res.data.flowRecordList[i][arr.some(j => j.status === 1) ? 'isGou' : 'isActive'] = true
if (!arr.some(j => j.status === 1)) break
if (!arr.some(j => j.status === 1)) {
break
} }
}
this.flowRecordId = res.data.flowRecordList.filter(i => i.isActive).length > 0 ? res.data.flowRecordList.filter(i => i.isActive)[0].flowDetailRespList[0].flowRecordId : ''
this.formList = res.data this.formList = res.data
this.isShow = true
} }
}, },
watch: {} watch: {}