9 changed files with 1649 additions and 7 deletions
@ -0,0 +1,113 @@ |
|||
import request from '@/utils/request' |
|||
// 入库导入的记录 /enterprisecentre
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/listPage', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
// 提交列表
|
|||
sealrecordSubmit: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/submit ', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 保存列表
|
|||
sealrecordSave: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/saveorUpdate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
fetchDetailsBySid: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/details', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 流程历史流转记录
|
|||
flowRecord: function(procInsId, deployId) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/task/flowRecord/' + procInsId + '/' + deployId, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/delete', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 办理待办
|
|||
complete: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/complete', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 流程审批(驳回)
|
|||
reject: function(params) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/reject', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 流程审批(终止)
|
|||
breakProcess: function(params) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/breakProcess', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 流程审批(撤回)
|
|||
revokeProcess: function(params) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/revokeProcess', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 审批流程(同意)获取下一环节
|
|||
getNextNodesForSubmit: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/getNextNodesForSubmit', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 审批流程(驳回)获取下一环节
|
|||
getPreviousNodesForReject: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/PaymentApply/getPreviousNodesForReject', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,320 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState ==1"> |
|||
<button-bar view-title="用款申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header"> |
|||
<el-form-item label="项目名称"> |
|||
<el-input v-model="listQuery.params.projectName" maxlength="20" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="企业名称"> |
|||
<el-input v-model="listQuery.params.enterpriseName" maxlength="20" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="申请日期"> |
|||
<el-date-picker v-model="listQuery.params.createTimeStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createTimeEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleReset">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleFilter">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">用款列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table v-loading="listLoading" ref="Table" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed width="50" type="selection" align="center"/> |
|||
<el-table-column fixed label="序号" type="index" width="60" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed width="150" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" width="90" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span> |
|||
<span v-else @click="handleFlowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="项目名称" prop="projectName" align="center"/> |
|||
<el-table-column label="企业名称" prop="enterpriseName" align="center"/> |
|||
<el-table-column label="申请人" prop="createByName" align="center"/> |
|||
<el-table-column label="申请日期" prop="createTime" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<ykAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|||
<ykInfo v-show="viewState ==4" ref="divInfo" @doback="resetState"/> |
|||
<el-dialog title="" :visible.sync="editDialog" width="78%" height="1%" :before-close="closeIt" center> |
|||
<!-- <iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe> --> |
|||
<flow-records :xml-data="xmlData" :task-data="taskList" :flow-record-list="flowRecordList"/> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yksq/yksq' |
|||
import Pagination from '@/components/pagination' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import ykAdd from './ykAdd.vue' |
|||
import ykInfo from './ykInfo.vue' |
|||
import { getStorage } from '@/utils/auth' |
|||
import flowRecords from '@/components/flow/flowRecord' |
|||
import { getFlowViewer, readXml } from '@/api/flow/todo' |
|||
|
|||
export default { |
|||
name: 'YongKuan', |
|||
components: { |
|||
Pagination, |
|||
ButtonBar, |
|||
ykAdd, |
|||
ykInfo, |
|||
flowRecords |
|||
}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
btndisabled: false, |
|||
url: '', |
|||
taskList: [], |
|||
xmlData: '', |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
editDialog: false, |
|||
searchxianshitit: '显示查询条件', |
|||
list: [], |
|||
flowRecordList: [], |
|||
state: '', |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
projectName: '', |
|||
enterpriseName: '', |
|||
createTimeStart: '', |
|||
createTimeEnd: '', |
|||
userSid: '' |
|||
} |
|||
}, |
|||
viewState: 1, |
|||
sids: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'toBan': |
|||
this.toEdit() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 初始化 |
|||
init() { |
|||
this.getList() |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.state = '' |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
req.listPage(this.listQuery).then((res) => { |
|||
if (res.success) { |
|||
this.listLoading = false |
|||
this.list = res.data.records |
|||
this.listQuery.total = res.data.total |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleReset() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 重置 |
|||
handleFilter() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
projectName: '', |
|||
enterpriseName: '', |
|||
createTimeStart: '', |
|||
createTimeEnd: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
closeIt() { |
|||
this.editDialog = false |
|||
}, |
|||
// 打开添加 |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showAdd() |
|||
}, |
|||
// 打开办理 |
|||
toEdit(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divAdd'].showEdit(row) |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
/** 流程流转记录 */ |
|||
handleFlowRecord(row) { |
|||
this.getModelDetail(row.procDefId) |
|||
this.getFlowViewer(row.procInstId) |
|||
this.getFlowRecordList(row.procInstId, row.procDefId) |
|||
this.editDialog = true |
|||
}, |
|||
/** xml 文件 */ |
|||
getModelDetail(procDefId) { |
|||
var token = getStorage() |
|||
// 发送请求,获取xml |
|||
readXml(procDefId, token).then(res => { |
|||
this.xmlData = res.data |
|||
}) |
|||
}, |
|||
// 已办环节的节点 |
|||
getFlowViewer(procInstId) { |
|||
var token = getStorage() |
|||
getFlowViewer(procInstId, token).then(res => { |
|||
this.taskList = res.data |
|||
}) |
|||
}, |
|||
/** 流程流转记录 */ |
|||
getFlowRecordList(procInstId, procDefId) { |
|||
req.flowRecord(procInstId, procDefId).then(res => { |
|||
this.flowRecordList = res.data.flowList |
|||
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值 |
|||
// if (res.data.formData) { |
|||
// this.formConf = res.data.formData |
|||
// this.formConfOpen = true |
|||
// } |
|||
}).catch(res => { |
|||
this.getList() |
|||
}) |
|||
}, |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 根据本行ID删除数据 |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.delBySids(this.sids).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ thead .el-table-column--selection .cell { |
|||
display: none; |
|||
} |
|||
</style> |
@ -0,0 +1,215 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ title }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveSubmit">提交</el-button> |
|||
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd" style="padding-bottom: 50px;"> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="titwu">生产经营用款</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-select v-model="formobj.projectName" @change="projectChange" placeholder="请选择" clearable > |
|||
<el-option v-for="(item,i) in projectSidList" :key="i" :label="item.entryName" :value="item.entryName"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb_item"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd" placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款企业</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.enterpriseName" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.createByName" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款申请</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.applyUse" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款金额</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.money" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yksq/yksq' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
title: '', |
|||
submitdisabled: false, |
|||
projectSidList: [], |
|||
formobj: { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.projectSidList = JSON.parse(window.sessionStorage.getItem('projectSidList')) |
|||
}, |
|||
methods: { |
|||
showAdd() { |
|||
this.title = '【新增】生产经营用款' |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
}, |
|||
showEdit(row) { |
|||
this.title = '【编辑】生产经营用款' |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
req.fetchDetailsBySid({ sid: row.sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
projectChange(value) { |
|||
const choose = this.projectSidList.filter((item) => item.entryName === value) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.projectSid = choose[0].sid |
|||
} else { |
|||
this.formobj.projectSid = '' |
|||
} |
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.sealrecordSave(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
saveSubmit() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.sealrecordSubmit(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
} |
|||
this.submitdisabled = false |
|||
this.$refs['dataForm'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
</style> |
@ -0,0 +1,163 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ title }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd" style="padding-bottom: 50px;"> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="titwu">生产经营用款</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.projectName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb_item"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createTime }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.enterpriseName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createByName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款申请</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.applyUse }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款金额</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.money }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yksq/yksq' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
title: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.title = '生产经营用款' |
|||
req.fetchDetailsBySid({ sid: row.sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn() { |
|||
this.formobj = { |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
warehouseName: '', |
|||
warehouseSid: '', |
|||
goodsValue: '', |
|||
createTime: '' |
|||
} |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
|
|||
/*/deep/ .el-collapse-item__header {*/ |
|||
/* height: 40px;*/ |
|||
/* padding: 10px;*/ |
|||
/* font-weight: bold;*/ |
|||
/* font-size: 20px;*/ |
|||
/* text-align: left;*/ |
|||
/* color: #ffffff;*/ |
|||
/* background-color: #0294d7;*/ |
|||
/*}*/ |
|||
|
|||
/*/deep/ .el-collapse-item__content {*/ |
|||
/* padding-bottom: 0;*/ |
|||
/*}*/ |
|||
</style> |
@ -0,0 +1,366 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ title }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|||
<!-- <el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> --> |
|||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="" style="padding-bottom: 50px;"> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="titwu">生产经营用款</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.projectName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb_item"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createTime }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.enterpriseName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createByName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款申请</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.applyUse }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款金额</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.money }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd" > |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yksq/yksq' |
|||
|
|||
export default { |
|||
name: 'ykDaiBan', |
|||
data() { |
|||
return { |
|||
title: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
}, |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
// ===获取参数 |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
this.linkByParameter.businessSid = obj.businessSid |
|||
this.linkByParameter.instanceId = obj.instanceId |
|||
this.linkByParameter.taskId = obj.taskId |
|||
this.linkByParameter.taskDefKey = obj.taskDefKey |
|||
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|||
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|||
this.current.taskDefKey = obj.taskDefKey |
|||
this.current.taskName = obj.taskName |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 480 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.title = '生产经营用款' |
|||
req.fetchDetailsBySid({ sid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '同意' |
|||
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '' |
|||
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.dialogList.comment = '' |
|||
this.currentLink = false |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|||
} else { |
|||
this.handleReject() |
|||
} |
|||
} else if (this.operation === '终止') { |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|||
} else { |
|||
this.handleStop() |
|||
} |
|||
} |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.complete(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.reject(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
req.breakProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
|
|||
.rowClass{ |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,229 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ title }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveSubmit">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="" style="padding-bottom: 50px;"> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="titwu">生产经营用款</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-select v-model="formobj.projectName" @change="projectChange" placeholder="请选择" clearable > |
|||
<el-option v-for="(item,i) in projectSidList" :key="i" :label="item.entryName" :value="item.entryName"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb_item"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd" placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款企业</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.enterpriseName" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.createByName" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款申请</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.applyUse" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款金额</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<el-input v-model="formobj.money" placeholder="" style="width:100%" class="addinputw" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Jzcksq/jzcksq' |
|||
|
|||
export default { |
|||
name: 'ykEdit', |
|||
data() { |
|||
return { |
|||
title: '', |
|||
submitdisabled: false, |
|||
projectSidList: [], |
|||
formobj: { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.projectSidList = JSON.parse(window.sessionStorage.getItem('projectSidList')) |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.title = '【编辑】生产经营用款' |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
req.fetchDetailsBySid({ sid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
projectChange(value) { |
|||
const choose = this.projectSidList.filter((item) => item.entryName === value) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.projectSid = choose[0].sid |
|||
} else { |
|||
this.formobj.projectSid = '' |
|||
} |
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.sealrecordSave(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
saveSubmit() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.sealrecordSubmit(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
} |
|||
this.submitdisabled = false |
|||
this.$refs['dataForm'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
|
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,215 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ title }}</div> |
|||
<div> |
|||
<el-button type="danger" size="small" @click="openRevoke()">撤 回 </el-button> |
|||
</div> |
|||
</div> |
|||
<div class="" style="padding-bottom: 50px;"> |
|||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="titwu">生产经营用款</div> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.projectName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb_item"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createTime }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款名称</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.enterpriseName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.createByName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款申请</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.applyUse }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用款金额</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{ formobj.money }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yksq/yksq' |
|||
|
|||
export default { |
|||
name: 'ykYiBan', |
|||
data() { |
|||
return { |
|||
title: '', |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
userSid: '', |
|||
createByName: '', |
|||
projectName: '', |
|||
projectSid: '', |
|||
enterpriseName: '', |
|||
enterpriseSid: '', |
|||
applyUse: '', |
|||
money: '', |
|||
voucherUrlList: [] |
|||
}, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
// ===获取参数 |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
this.linkByParameter.businessSid = obj.businessSid |
|||
this.linkByParameter.instanceId = obj.instanceId |
|||
this.linkByParameter.taskId = obj.taskId |
|||
this.linkByParameter.taskDefKey = obj.taskDefKey |
|||
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|||
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 475 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.title = '生产经营用款' |
|||
req.fetchDetailsBySid({ sid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
req.revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
|
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
Loading…
Reference in new issue