You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
353 lines
12 KiB
353 lines
12 KiB
<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.number" maxlength="20" placeholder="请输入油罐编号" class="addinputw"
|
|
clearable />
|
|
</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="80" label="操作" align="center">
|
|
<template slot-scope="scope">
|
|
<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="project_name" align="center" />
|
|
<el-table-column label="审批编号" prop="code" align="center" />
|
|
<el-table-column label="申请人" prop="applicant_name" align="center" />
|
|
<el-table-column label="申请日期" prop="applicant_date" align="center" />
|
|
<el-table-column label="用印章人" prop="user_name" align="center" />
|
|
<el-table-column label="加盖何种公章" prop="seal_type" align="center" />
|
|
</el-table>
|
|
</div>
|
|
<div class="pages">
|
|
<pagination v-show="list.length > 0" :total="total" :page.sync="listQuery.current"
|
|
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<AddYjsq v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
|
|
<LookYjsq v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" />
|
|
<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/Yjsq/index'
|
|
import Pagination from '@/components/pagination'
|
|
import ButtonBar from '@/components/ButtonBar'
|
|
import AddYjsq from './AddYjsq.vue'
|
|
import LookYjsq from './LookYjsq.vue'
|
|
import { getStorage } from '@/utils/auth'
|
|
import flowRecords from '@/components/flow/flowRecord'
|
|
import { getFlowViewer, readXml } from '@/api/flow/todo'
|
|
export default {
|
|
name: 'CustomerManagement',
|
|
components: {
|
|
Pagination,
|
|
ButtonBar,
|
|
AddYjsq,
|
|
LookYjsq,
|
|
flowRecords
|
|
},
|
|
data() {
|
|
return {
|
|
listLoading: false,
|
|
btndisabled: false,
|
|
form: {},
|
|
url: '',
|
|
taskList: [],
|
|
xmlData: '',
|
|
btnList: [{
|
|
type: 'primary',
|
|
size: 'small',
|
|
icon: 'plus',
|
|
btnKey: 'toAdd',
|
|
btnLabel: '新增'
|
|
},
|
|
{
|
|
type: 'primary',
|
|
size: 'small',
|
|
icon: 'submit',
|
|
btnKey: 'toBan',
|
|
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,
|
|
params: {
|
|
entryName: '',
|
|
},
|
|
},
|
|
total: 0,
|
|
viewState: 1,
|
|
sids:'',
|
|
userSid:'',
|
|
listQuerys: {
|
|
current: 1,
|
|
size: 10,
|
|
total: 0,
|
|
params: {
|
|
userSid: ''
|
|
}
|
|
},
|
|
}
|
|
},
|
|
mounted() {
|
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
},
|
|
created() {
|
|
this.init()
|
|
// 加载列表
|
|
// req.pagerList(this.listQuerys).then((res) => {
|
|
|
|
// })
|
|
},
|
|
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.code==200){
|
|
this.listLoading = false
|
|
this.list=res.data.records
|
|
this.total=res.data.total
|
|
}
|
|
})
|
|
},
|
|
// 查询按钮
|
|
handleReset() {
|
|
this.listQuery.current = 1
|
|
this.getList()
|
|
},
|
|
// 重置
|
|
handleFilter() {
|
|
this.listQuery = {
|
|
current: 1,
|
|
size: 10,
|
|
params: {
|
|
entryName: ""
|
|
}
|
|
}
|
|
this.total=0,
|
|
this.getList()
|
|
},
|
|
closeIt() {
|
|
this.editDialog = false
|
|
},
|
|
// 打开添加
|
|
toAdd() {
|
|
this.viewState = 2
|
|
},
|
|
toInfo(row) {
|
|
this.viewState = 4
|
|
this.$refs['divInfo'].showInfo(row.sid)
|
|
},
|
|
// 打开办理
|
|
toEdit() {
|
|
var usSid=window.sessionStorage.getItem('userSid')
|
|
if(this.state=='待提交' && this.userSid==usSid || this.state=='用章申请' && this.userSid==usSid){
|
|
this.viewState = 3
|
|
this.$refs['divAdd'].showEdit(this.sids)
|
|
}else if(this.state!='待提交' && this.state!='用章申请' && this.userSid==usSid && this.state!=''){
|
|
this.$message({
|
|
message: '已提交,不能继续办理',
|
|
type: 'warning'
|
|
});
|
|
}else if(this.state=='待提交' && this.userSid!=usSid || this.state=='用章申请' && this.userSid!=usSid){
|
|
this.$message({
|
|
message: '非本人发起的申请,无权限操作',
|
|
type: 'warning'
|
|
});
|
|
}else if(this.state=='终止'){
|
|
this.$message({
|
|
message: '该印鉴信息已终止,您无法办理',
|
|
type: 'warning'
|
|
});
|
|
}
|
|
},
|
|
/** 流程流转记录 */
|
|
handleFlowRecord(row) {
|
|
this.getModelDetail(row.procDefId)
|
|
this.getFlowViewer(row.procInsId)
|
|
this.getFlowRecordList(row.procInsId, row.procDefId)
|
|
this.editDialog = true
|
|
},
|
|
/** xml 文件 */
|
|
getModelDetail(procDefId) {
|
|
var token = getStorage()
|
|
// 发送请求,获取xml
|
|
readXml(procDefId, token).then(res => {
|
|
this.xmlData = res.data
|
|
})
|
|
},
|
|
// 已办环节的节点
|
|
getFlowViewer(procInsId) {
|
|
var token = getStorage()
|
|
getFlowViewer(procInsId, token).then(res => {
|
|
this.taskList = res.data
|
|
})
|
|
},
|
|
/** 流程流转记录 */
|
|
getFlowRecordList(procInsId, procDefId) {
|
|
req.flowRecord(procInsId,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) {
|
|
this.sids = ''
|
|
this.state = ''
|
|
this.userSid = ''
|
|
const aa = []
|
|
row.forEach((element) => {
|
|
this.sids = element.sid
|
|
this.state = element.nodeState
|
|
this.userSid = element.user_sid
|
|
})
|
|
if (row.length > 1) {
|
|
this.$refs.Table.clearSelection()
|
|
this.$refs.Table.toggleRowSelection(row.pop())
|
|
}
|
|
},
|
|
// 根据本行ID删除数据
|
|
doDel() {
|
|
const sids = []
|
|
sids.push(this.sids)
|
|
if(this.sids && this.state=='待提交'){
|
|
const tip = '请确认是否删除所选记录?'
|
|
this.$confirm(tip, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
req.delBySids(sids).then((res) => {
|
|
if (res.code == 200){
|
|
this.$message.success('删除成功')
|
|
this.getList()
|
|
}
|
|
})
|
|
})
|
|
}else if(this.state!='待提交' && this.state!=''){
|
|
this.$message({
|
|
message: '已提交的印鉴信息无法删除',
|
|
type: 'warning'
|
|
});
|
|
}else{
|
|
this.$message({
|
|
message: '请选择要删除的印鉴信息',
|
|
type: 'warning'
|
|
});
|
|
}
|
|
},
|
|
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>
|
|
|