|
|
@ -58,9 +58,10 @@ |
|
|
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="状态" align="center"> |
|
|
|
<el-table-column label="状态" width="180px" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.nodeState }}</span> |
|
|
|
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span> |
|
|
|
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="申请日期" align="center"> |
|
|
@ -108,6 +109,9 @@ |
|
|
|
</div> |
|
|
|
<expenseAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|
|
|
<expenseInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/> |
|
|
|
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> |
|
|
|
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -116,9 +120,10 @@ import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import req from '@/api/anruifinmanagement/expense' |
|
|
|
import { typeValues } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import { typeValues, selectHaveMessage } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import expenseAdd from './expenseAdd.vue' |
|
|
|
import expenseInfo from './expenseInfo.vue' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'feiyongshenqingguaili', |
|
|
@ -131,6 +136,9 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
url: '', |
|
|
|
dialogHeight: '80%', |
|
|
|
centerDialogVisible: false, |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
@ -185,7 +193,8 @@ export default { |
|
|
|
costTypeKey: '', |
|
|
|
state: '', |
|
|
|
useTypeKey: '', |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
orgPath: '' |
|
|
|
}, |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
@ -199,9 +208,40 @@ export default { |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
|
|
|
window.addEventListener('message', this.handleMessage) |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async handleMessage(event) { |
|
|
|
var code = '' |
|
|
|
if (event.data.params !== null && event.data.params !== undefined) { |
|
|
|
code = event.data.params.code |
|
|
|
} |
|
|
|
if (code === 1) { |
|
|
|
this.init() |
|
|
|
this.centerDialogVisible = false |
|
|
|
} else if (code === 2) { |
|
|
|
this.dialogHeight = event.data.params.data |
|
|
|
this.setIframeHeight(document.getElementById('iframe')) |
|
|
|
} |
|
|
|
}, |
|
|
|
closeIt() { |
|
|
|
this.url = '' |
|
|
|
this.centerDialogVisible = false |
|
|
|
}, |
|
|
|
setIframeHeight(iframe) { |
|
|
|
iframe.height = this.dialogHeight |
|
|
|
}, |
|
|
|
flowRecord(row) { |
|
|
|
this.centerDialogVisible = true |
|
|
|
var params = { |
|
|
|
deployId: row.procDefId, |
|
|
|
procInsId: row.procInstId, |
|
|
|
token: getStorage() |
|
|
|
} |
|
|
|
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) |
|
|
|
}, |
|
|
|
init() { |
|
|
|
typeValues({ type: 'costType' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
@ -264,14 +304,11 @@ export default { |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
req.listPage(this.listQuery).then((response) => { |
|
|
|
console.log('列表查询结果:', response) |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
|
response.success && |
|
|
|
response.data && |
|
|
|
response.data.total > 0 |
|
|
|
) { |
|
|
|
if (response.success) { |
|
|
|
this.list = response.data.records |
|
|
|
this.listQuery.total = response.data.total |
|
|
|
} else { |
|
|
@ -294,7 +331,8 @@ export default { |
|
|
|
costTypeKey: '', |
|
|
|
state: '', |
|
|
|
useTypeKey: '', |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
orgPath: '' |
|
|
|
}, |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
@ -303,8 +341,12 @@ export default { |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
toAdd() { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid) |
|
|
|
selectHaveMessage({ menuUrl: this.$route.path, orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
doDel() { |
|
|
|