|
@@ -64,7 +64,7 @@
|
|
|
<vxe-toolbar ref="gwCirculationCard2Toolbar" :refresh="{query: refreshList}" import export print custom>
|
|
|
<template #buttons>
|
|
|
<el-button v-if="hasPermission('circulation2:gwCirculationCard2:add')" type="primary" icon="plus" @click="add()">新建</el-button>
|
|
|
- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="warning" icon="edit-filled" @click="edit()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length === 1" plain>修改</el-button>
|
|
|
+ <!-- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="warning" icon="edit-filled" @click="edit()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length === 1" plain>修改</el-button> -->
|
|
|
<el-button v-if="hasPermission('circulation2:gwCirculationCard2:del')" type="danger" icon="del-filled" @click="del()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length > 0" plain>删除</el-button>
|
|
|
</template>
|
|
|
<template #tools>
|
|
@@ -199,10 +199,11 @@
|
|
|
width="200"
|
|
|
title="操作">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:view')" type="primary" text icon="view-filled" @click="view(row.id)">查看</el-button>
|
|
|
+ <el-button v-if="!daiban" type="primary" text icon="view-filled" @click="view(row.id)">查看</el-button>
|
|
|
|
|
|
<el-button v-if="daiban" type="primary" text icon="view-filled" @click="view2(row.id)">阅办</el-button>
|
|
|
<!-- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="primary" text icon="edit-filled" @click="edit(row.id)">修改</el-button> -->
|
|
|
+ <el-button v-if="row.state!=2&&this.role=='办公室管理员'" type="danger" text icon="switch-button" @click="abort(row.id)">中止</el-button>
|
|
|
<el-button v-if="hasPermission('circulation2:gwCirculationCard2:del')" type="danger" text icon="del-filled" @click="del(row.id)">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
@@ -224,7 +225,7 @@
|
|
|
<GwCirculationCard2Form2 ref="gwCirculationCard2Form2" @refreshDataList="refreshList"></GwCirculationCard2Form2>
|
|
|
<GwCirculationCard2FormYb ref="GwCirculationCard2FormYb" @refreshDataList="refreshList"></GwCirculationCard2FormYb>
|
|
|
<!-- <fileInfo ref="fileInfo" @refreshDataList="refreshList"></fileInfo> -->
|
|
|
-
|
|
|
+ <abordConfirm ref="abordConfirm" @refreshDataList="refreshList"></abordConfirm>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -232,6 +233,8 @@
|
|
|
import GwCirculationCard2Form from './GwCirculationCard2Form'
|
|
|
import GwCirculationCard2Form2 from './GwCirculationCard2Form2'
|
|
|
import GwCirculationCard2FormYb from './GwCirculationCard2FormYb'
|
|
|
+ import abordConfirm from './abordConfirm.vue'
|
|
|
+ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
|
|
|
|
|
//import fileInfo from './fileInfo'
|
|
@@ -239,6 +242,7 @@
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
+ role:'',
|
|
|
searchVisible: true,
|
|
|
daiban:false,
|
|
|
searchForm: {
|
|
@@ -265,7 +269,8 @@
|
|
|
components: {
|
|
|
GwCirculationCard2Form,
|
|
|
GwCirculationCard2Form2,
|
|
|
- GwCirculationCard2FormYb
|
|
|
+ GwCirculationCard2FormYb,
|
|
|
+ abordConfirm
|
|
|
},
|
|
|
created () {
|
|
|
},
|
|
@@ -279,6 +284,9 @@
|
|
|
},
|
|
|
activated () {
|
|
|
this.refreshList()
|
|
|
+
|
|
|
+ let user = JSON.parse(window.localStorage.getItem('USER_INFO'))
|
|
|
+ this.role = user.roleNames
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取数据列表
|
|
@@ -363,6 +371,91 @@
|
|
|
view2 (id) {
|
|
|
this.$refs.GwCirculationCard2FormYb.init('edit', id)
|
|
|
},
|
|
|
+
|
|
|
+ //中止操作
|
|
|
+ abort(id){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ ElMessageBox.prompt('确定中止所选项吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern:
|
|
|
+ /.+/,
|
|
|
+ inputErrorMessage: '请输入中止说明',
|
|
|
+ })
|
|
|
+ .then(({ value }) => {
|
|
|
+
|
|
|
+
|
|
|
+ gwCirculationCard2Service.abort(id,value).then((data) => {
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+
|
|
|
+ // ElMessage({
|
|
|
+ // type: 'success',
|
|
|
+ // message: `Your email is:${value}`,
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ ElMessage({
|
|
|
+ type: '提示',
|
|
|
+ message: '已取消当前操作',
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // this.$confirm('确定中止所选项吗?', '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // inputPattern: /.+/,
|
|
|
+ // inputErrorMessage: '输入内容不能为空',
|
|
|
+ // inputPlaceholder: '请输入中止说明',
|
|
|
+ // inputType: 'text',
|
|
|
+ // callback: (action, instance) => {
|
|
|
+ // if (action === 'confirm') {
|
|
|
+ // this.loading = true
|
|
|
+
|
|
|
+ // console.log(`输入的内容是:${instance.inputValue}`);
|
|
|
+
|
|
|
+ // gwCirculationCard2Service.abort(id,instance.inputValue).then((data) => {
|
|
|
+ // this.$message.success(data)
|
|
|
+ // this.refreshList()
|
|
|
+ // this.loading = false
|
|
|
+ // }).catch(() => {
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+
|
|
|
+ // this.$confirm(`确定中止所选项吗?`, '提示', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // inputPattern: /.+/,
|
|
|
+ // inputErrorMessage: '输入内容不能为空',
|
|
|
+ // inputPlaceholder: '请输入中止说明',
|
|
|
+ // inputType: 'text',
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ // this.loading = true
|
|
|
+ // gwCirculationCard2Service.delete(ids).then((data) => {
|
|
|
+ // this.$message.success(data)
|
|
|
+ // this.refreshList()
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
// 删除
|
|
|
del (id) {
|
|
|
let ids = id || this.$refs.gwCirculationCard2Table.getCheckboxRecords().map(item => {
|