作者 张晓杰

合同归档、删除汇总菜单的新增修改删除操作

import request from '@/utils/request'
// 查询【请填写功能名称】列表
// 查询【合同审批】列表
export function listContract(query) {
return request({
url: '/system/contract/list',
... ... @@ -9,6 +9,15 @@ export function listContract(query) {
})
}
// 查询【合同归档】列表
export function listSealContract(query) {
return request({
url: '/system/contract/listSealContract',
method: 'get',
params: query
})
}
// 查询【请填写功能名称】详细
export function getContract(Contractno) {
return request({
... ... @@ -51,3 +60,11 @@ export function delContract(Contractno) {
method: 'delete'
})
}
export function updateSealByContractno(data) {
return request({
url: '/system/contract/updateSealByContractno',
method: 'post',
data: data
})
}
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
... ... @@ -63,7 +63,7 @@
@click="handleDelete"
v-hasPermi="['system:accountabilitysummary:remove']"
>删除</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
... ... @@ -85,7 +85,7 @@
<el-table-column label="处理类型" align="center" prop="processingtypes" />
<el-table-column label="经济处理" align="center" prop="economicprocessing" />
<!-- <el-table-column label="" align="center" prop="id" v-if="true"/> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -102,7 +102,7 @@
v-hasPermi="['system:accountabilitysummary:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination
... ...
... ... @@ -24,7 +24,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
... ... @@ -55,7 +55,7 @@
@click="handleDelete"
v-hasPermi="['system:assessmentsummary:remove']"
>删除</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
... ... @@ -79,7 +79,7 @@
<el-table-column label="汇总" align="center" prop="summary" />
<el-table-column label="排名" align="center" prop="ranking" />
<!-- <el-table-column label="" align="center" prop="id" v-if="true"/> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -96,7 +96,7 @@
v-hasPermi="['system:assessmentsummary:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination
... ...
... ... @@ -16,7 +16,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
... ... @@ -47,7 +47,7 @@
@click="handleDelete"
v-hasPermi="['system:problemrectificationsummary:remove']"
>删除</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
... ... @@ -68,7 +68,7 @@
<el-table-column label="整改完成数" align="center" prop="completedNumber" />
<el-table-column label="未完成数" align="center" prop="unfinishedNumber" />
<!-- <el-table-column label="" align="center" prop="id" v-if="true"/> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -85,7 +85,7 @@
v-hasPermi="['system:problemrectificationsummary:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination
... ...
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" >
<el-form-item label="合同编号" prop="contractno">
<el-input
v-model="queryParams.contractno"
placeholder="请输入合同编号"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.contractno" placeholder="请输入合同编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="合同名称" prop="contractName">
<el-input
v-model="queryParams.contractName"
placeholder="请输入合同名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" >搜索</el-button >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" >重置</el-button >
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!--<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:contract:add']"
>新增</el-button>
</el-col>-->
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:contract:edit']"
>修改</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:contract:remove']"
>删除</el-button
>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['system:contract:remove']" >删除</el-button >
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:contract:export']"
>导出</el-button
>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:contract:export']" >导出</el-button >
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="contractList"
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="合同编号"
align="center"
prop="contractno"
width="100"
/>
<el-table-column
label="合同名称"
align="center"
prop="contractName"
width="200"
/>
<el-table-column
label="合同类型"
align="center"
prop="contractType"
width="100"
/>
<el-table-column
label="合同金额"
align="center"
prop="contractAmount"
width="100"
>
<template slot-scope="scope">
<el-button
type="text"
size="mini"
@click="handleContractAmount(scope.row)"
>{{scope.row.contractAmount}}</el-button
>
</template></el-table-column>
<el-table-column
label="生效日期"
align="center"
prop="effectiveDate"
width="100"
>
<el-table-column label="合同编号" align="center" prop="contractno" width="100" />
<el-table-column label="合同名称" align="center" prop="contractName" width="200" />
<el-table-column label="合同类型" align="center" prop="contractType" width="100" />
<el-table-column label="合同金额" align="center" prop="contractAmount" width="100" />
<el-table-column label="生效日期" align="center" prop="effectiveDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.effectiveDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="到期日期"
align="center"
prop="expirationDate"
width="100"
>
<el-table-column label="到期日期" align="center" prop="expirationDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expirationDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="甲方" align="center" prop="partyA" width="200">
<template slot-scope="scope">
<a
:href="scope.row.partyAAddress"
target="_blank"
style="color: #1890ff"
>{{ scope.row.partyA }}</a
>
<a :href="scope.row.partyAAddress" target="_blank" style="color: #1890ff" >{{ scope.row.partyA }}</a >
</template>
</el-table-column>
<el-table-column label="乙方" align="center" prop="partyB" width="200">
<template slot-scope="scope">
<a
:href="scope.row.partyBAddress"
target="_blank"
style="color: #1890ff"
>{{ scope.row.partyB }}</a
>
<a :href="scope.row.partyBAddress" target="_blank" style="color: #1890ff" >{{ scope.row.partyB }}</a >
</template>
</el-table-column>
<el-table-column
label="付款方式"
align="center"
prop="paymentMethod"
width="200"
/>
<el-table-column
label="签订日期"
align="center"
prop="signingDate"
width="100"
>
<el-table-column label="付款方式" align="center" prop="paymentMethod" width="200" />
<el-table-column label="签订日期" align="center" prop="signingDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.signingDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="标的物信息"
align="center"
prop="subjectInformation"
width="200"
/>
<el-table-column
label="附件"
align="center"
prop="attachments"
width="100"
>
<!-- <template slot-scope="scope">
<img :src="baseUrl + scope.row.attachments" width="40px" height="auto" style="cursor: pointer"/>
</template> -->
<el-table-column label="标的物信息" align="center" prop="subjectInformation" width="200" />
<el-table-column label="合同状态" align="center" prop="status" width="200" >
<template slot-scope="scope">
<img
v-if="scope.row.attachments"
src="@/assets/images/PDF.png"
@click="preview(scope.row.attachments)"
width="40px"
height="auto"
style="cursor: pointer"
/>
<el-tag v-if="scope.row.status == '0'">进行中</el-tag>
<el-tag type="danger" v-if="scope.row.status == '1'">已终止</el-tag>
<el-tag type="info" v-if="scope.row.status == '2'">已解除</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">已完成</el-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
width="200"
>
<el-table-column label="审批状态" align="center" prop="approvalTatus" width="200" >
<template slot-scope="scope">
<el-button
type="text"
size="mini"
icon="el-icon-tickets"
@click="handleFlowRecord(scope.row)"
v-hasPermi="['workflow:process:query']"
>详情</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="scope.row.finishTime"
v-hasPermi="['workflow:process:remove']"
>删除</el-button
>
<el-button
type="text"
size="mini"
icon="el-icon-circle-close"
@click="handleStop(scope.row)"
v-hasPermi="['workflow:process:cancel']"
>取消</el-button
>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['workflow:process:start', 'workflow:process:start']">
<dict-tag :options="dict.type.wf_process_status" :value="scope.row.processStatus"/>
</template>
</el-table-column>
<el-table-column label="附件" align="center" prop="attachments" width="100" >
<template slot-scope="scope">
<img v-if="scope.row.attachments" src="@/assets/images/PDF.png" @click="preview(scope.row.attachments)" width="40px" height="auto" style="cursor: pointer" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200" >
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-tickets" @click="handleFlowRecord(scope.row)" v-hasPermi="['workflow:process:query']" >详情</el-button >
<el-button type="text" size="mini" icon="el-icon-upload" v-if="scope.row.processStatus =='completed' && !scope.row.sealContract" @click="handleUploadSealContract(scope.row)" >上传合同</el-button >
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" >
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleAgain" icon="el-icon-refresh-right"
v-hasPermi="['workflow:process:start']">重新发起</el-dropdown-item>
<el-dropdown-item command="handleEvaluate" icon="el-icon-star-off"
>履行评价</el-dropdown-item>
<el-dropdown-item command="handleEdit" icon="el-icon-edit-outline"
v-hasPermi="['workflow:process:start']">合同变更</el-dropdown-item>
<el-dropdown-item command="handleUnbind" icon="el-icon-edit-outline">
解绑</el-dropdown-item>
>重新发起</el-dropdown-item>
<el-dropdown-item command="handleDelete" icon="el-icon-delete" v-hasPermi="['workflow:process:remove']"
>删除</el-dropdown-item>
<el-dropdown-item command="handleStop" icon="el-icon-delete" v-hasPermi="['workflow:process:cancel']"
>取消</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
... ... @@ -266,91 +100,21 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog
title="合同预览"
:visible.sync="dialogVisibleContract"
width="50%"
center
:before-close="handleClose"
>
<vue-pdf
:src="pdfUrl"
type="application/pdf"
width="100%"
height="800px"
v-if="pdfUrl"
/>
<el-dialog title="合同预览" :visible.sync="dialogVisibleContract" width="50%" center :before-close="handleClose" >
<pdf :src="pdfUrl" type="application/pdf" width="100%" height="800px" v-if="pdfUrl" />
</el-dialog>
<!-- 添加或修改【请填写功能名称】对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<!-- <el-form-item label="合同编号" prop="contractno">
<el-input v-model="form.contractno" placeholder="请输入合同编号" />
</el-form-item>
<el-form-item label="合同名称" prop="contractName">
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
</el-form-item>
<el-form-item label="合同类型" prop="contractType">
<el-input v-model="form.contractType" placeholder="请输入合同类型" />
</el-form-item>
<el-form-item label="合同金额" prop="contractAmount">
<el-input
v-model="form.contractAmount"
placeholder="请输入合同金额"
/>
</el-form-item>
<el-form-item label="生效日期" prop="effectiveDate">
<el-date-picker
v-model="form.effectiveDate"
placeholder="请输入生效日期"
/>
</el-form-item>
<el-form-item label="到期日期" prop="expirationDate">
<el-date-picker
v-model="form.expirationDate"
placeholder="请输入到期日期"
/>
</el-form-item>
<el-form-item label="甲方" prop="partyA">
<el-input v-model="form.partyA" placeholder="请输入甲方" />
</el-form-item>
<el-form-item label="乙方" prop="partyB">
<el-input v-model="form.partyB" placeholder="请输入乙方" />
</el-form-item>
<el-form-item label="付款方式" prop="paymentMethod">
<el-input v-model="form.paymentMethod" placeholder="请输入付款方式" />
</el-form-item>
<el-form-item label="签订日期" prop="signingDate">
<el-date-picker
v-model="form.signingDate"
placeholder="请输入签订日期"
/>
</el-form-item>
<el-form-item label="标的物信息" prop="subjectInformation">
<el-input
v-model="form.subjectInformation"
placeholder="请输入标的物信息"
/>
</el-form-item>
<el-form-item label="附件" prop="attachments">
<el-input v-model="form.attachments" placeholder="请输入附件" />
</el-form-item> -->
<el-form-item label="变更原因" prop="reasonChange">
<el-input v-model="form.reasonChange" placeholder="请输入变更原因" />
</el-form-item>
<el-form-item label="变更内容" prop="reasonText">
<el-input
type="textarea"
v-model="form.reasonText"
placeholder="请输入变更内容"
:row="3"
/>
<el-input type="textarea" v-model="form.reasonText" placeholder="请输入变更内容" :row="3" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"
>确 定</el-button
>
<el-button :loading="buttonLoading" type="primary" @click="submitForm" >确 定</el-button >
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
... ... @@ -388,26 +152,52 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog :title="title" :visible.sync="showDialogUploadSealContract" width="500px">
<el-upload
class="upload-demo"
ref="upload"
:accept="'application/pdf'"
:before-upload="beforeUpload"
:action="this.url"
:headers="this.headers"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-change="handleChange"
:file-list="this.fileList"
:auto-upload="false"
:limit="1"
:multiple="false"
:on-success="handleSuccess"
:before-remove="beforeRemove"
:on-exceed="handleExceed"
name="files"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px" size="small" type="success" @click="submitUpload" >上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">只能上传大小不超过 5MB 的 PDF 文件</div>
</el-upload>
</el-dialog>
</div>
</template>
<script>
import {
listContract,
getContract,
delContract,
addContract,
updateContract,
} from "@/api/compliancemanagement/contract";
import {listContract,getContract,delContract,addContract,updateContract,updateSealByContractno} from "@/api/compliancemanagement/contract";
import { startProcess, stopProcess } from "@/api/workflow/process";
import VuePdf from "vue-pdf";
import pdf from 'vue-pdf';
import { getToken } from "@/utils/auth";
export default {
name: "Contract",
dicts: ['wf_process_status'],
components: {
VuePdf,
pdf,
},
data() {
return {
headers: {
Authorization: "Bearer " + getToken(),
},
url: process.env.VUE_APP_BASE_API + "/common/uploads",
fileList: [],
ContractAmountList:[
{amountDate:'2024-07-05',
amount:'100'},{amountDate:'2024-07-10',
... ... @@ -522,17 +312,89 @@ export default {
],
id: [{ required: true, message: "不能为空", trigger: "blur" }],
},
showDialogEvaluate:false
showDialogEvaluate:false,
showDialogUploadSealContract:false,
contractnoTemp:''
};
},
created() {
this.getList();
},
methods: {
handleUploadSealContract(row){
this.contractnoTemp = row.contractno
this.showDialogUploadSealContract = true
this.title = '上传用印合同'
},
beforeUpload(file) {
const isPDF = file.type === 'application/pdf';
const isLt5M = file.size / 1024 / 1024 < 5;
if (!isPDF) {
this.$message.error('只能上传 PDF 文件');
return false;
}
if (!isLt5M) {
this.$message.error('上传文件大小不能超过 5MB');
return false;
}
// 如果需要其他处理,可以在这里添加
return true; // 返回 true 允许上传
},
handleChange(file, fileList) {
this.fileList = fileList;
},
handleSuccess(response, file, fileList) {
// response 是上传成功后的响应数据
// 可以从中获取文件地址或文件名
// 假设后端返回的数据结构中有一个字段 url 表示文件地址
console.log('response',response)
this.showDialogUploadSealContract = false
const fileUrl = response.data.fileNames;
// 将文件地址或文件名赋值给表单的字段
this.form.templatefile =fileUrl;
const params = {
contractno:this.contractnoTemp,
sealContract:fileUrl
}
updateSealByContractno(params).then((response) => {
console.log('上传更新',response),
this.form.templatefile = ''
});
this.fileList = []
this.$router.push({
path: "/contract/compliancemanagement/contractmanagement/contractfiling",
});
},
handleRemove(file, fileList) {
this.form.templatefile=''
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制上传 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
this.fileList = fileList;
if (file && file.status==="success") {
return this.$confirm(`确定移除 ${file.name}?`);
}
},
submitUpload() {
this.$refs.upload.submit();
},
handleContractAmount(row){
this.showContractAmount = true
this.title = '进度'
},
// 更多操作触发
handleCommand(command, row) {
... ... @@ -549,7 +411,12 @@ export default {
case "handleUnbind":
this.handleUnbind(row);
break;
case "handleDelete":
this.handleDelete(row);
break;
case "handleStop":
this.handleStop(row);
break;
default:
break;
}
... ... @@ -576,7 +443,8 @@ export default {
preview(contract) {
this.dialogVisibleContract = true;
console.log("contract:", contract);
this.pdfUrl = this.baseUrl + contract;
// this.pdfUrl = process.env.VUE_APP_BASE_API+contract;
this.pdfUrl = this.baseUrl+contract;
},
handleClose() {
this.pdfUrl = "";
... ...
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" >
<el-form-item label="合同编号" prop="contractno">
<el-input v-model="queryParams.contractno" placeholder="请输入合同编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="合同名称" prop="contractName">
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" >搜索</el-button >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" >重置</el-button >
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:contract:export']" >导出</el-button >
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
</el-row> -->
<el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="合同编号" align="center" prop="contractno" width="100" />
<el-table-column label="合同名称" align="center" prop="contractName" width="200" />
<el-table-column label="合同类型" align="center" prop="contractType" width="100" />
<el-table-column label="合同金额" align="center" prop="contractAmount" width="100" >
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleContractAmount(scope.row)" >{{scope.row.contractAmount}}</el-button >
</template></el-table-column>
<el-table-column label="生效日期" align="center" prop="effectiveDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.effectiveDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="到期日期" align="center" prop="expirationDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expirationDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="甲方" align="center" prop="partyA" width="200">
<template slot-scope="scope">
<a :href="scope.row.partyAAddress" target="_blank" style="color: #1890ff" >{{ scope.row.partyA }}</a >
</template>
</el-table-column>
<el-table-column label="乙方" align="center" prop="partyB" width="200">
<template slot-scope="scope">
<a :href="scope.row.partyBAddress" target="_blank" style="color: #1890ff" >{{ scope.row.partyB }}</a >
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" prop="paymentMethod" width="200" />
<el-table-column label="签订日期" align="center" prop="signingDate" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.signingDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="标的物信息" align="center" prop="subjectInformation" width="200" />
<el-table-column label="合同状态" align="center" prop="status" width="200" >
<template slot-scope="scope">
<el-tag v-if="scope.row.status == '0'">进行中</el-tag>
<el-tag type="danger" v-if="scope.row.status == '1'">已终止</el-tag>
<el-tag type="info" v-if="scope.row.status == '2'">已解除</el-tag>
<el-tag type="warning" v-if="scope.row.status == '3'">已完成</el-tag>
</template>
</el-table-column>
<el-table-column label="用印合同" align="center" prop="seal_contract" width="100" >
<template slot-scope="scope">
<img v-if="scope.row.sealContract" src="@/assets/images/PDF.png" @click="preview(scope.row.sealContract)" width="40px" height="auto" style="cursor: pointer" />
</template>
</el-table-column>
<el-table-column
label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="250" >
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-star-off" @click="handleEvaluate(scope.row)" >履行评价</el-button >
<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="handleEdit(scope.row)" >合同变更</el-button >
<el-button type="text" size="mini" icon="el-icon-edit-outline" @click="handleUnbind(scope.row)" >解绑合同</el-button >
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 合同预览 -->
<el-dialog title="合同预览" :visible.sync="dialogVisibleContract" width="50%" center :before-close="handleClose" >
<pdf :src="pdfUrl" type="application/pdf" width="100%" height="800px" v-if="pdfUrl" />
</el-dialog>
<!-- 合同变更 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="变更原因" prop="reasonChange">
<el-input v-model="form.reasonChange" placeholder="请输入变更原因" />
</el-form-item>
<el-form-item label="变更内容" prop="reasonText">
<el-input type="textarea" v-model="form.reasonText" placeholder="请输入变更内容" :row="3" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm" >确 定</el-button >
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 履行评价 -->
<el-dialog :title="title" :visible.sync="showDialogEvaluate">
<el-table :data="tableData" style="width: 100%" border>
<el-table-column prop="content" label="内容" width="200"></el-table-column>
<el-table-column prop="description" label="评价描述" width="350">
<template slot-scope="scope">
<el-input v-model="scope.row.description" clearable />
</template>
</el-table-column>
<el-table-column prop="level" label="评价等级">
<template slot-scope="scope">
<el-radio v-model="scope.row.level" label="1">优秀</el-radio>
<el-radio v-model="scope.row.level" label="2">良好</el-radio>
<el-radio v-model="scope.row.level" label="3">一般</el-radio>
<el-radio v-model="scope.row.level" label="4">较差</el-radio>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitFormEvaluate">确 定</el-button >
<el-button @click="cancelEvaluate">取 消</el-button>
</div>
</el-dialog>
<!-- 付款进度 -->
<el-dialog :title="title" :visible.sync="showContractAmount" width="500px">
<el-table :data="ContractAmountList" >
<el-table-column prop="amountDate" label="日期" ></el-table-column>
<el-table-column prop="amount" label="已付/已收金额(元)" >
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { listSealContract, getContract, delContract, addContract, updateContract} from "@/api/compliancemanagement/contract";
import { startProcess, stopProcess } from "@/api/workflow/process";
import pdf from 'vue-pdf';
export default {
name: "contractfiling",
dicts: ['wf_process_status'],
components: {
pdf,
},
data() {
return {
ContractAmountList:[
{amountDate:'2024-07-05',
amount:'100'},{amountDate:'2024-07-10',
amount:'100'}
],
showContractAmount:false,
tableData: [{
content: '合同规范性',
description: '',
level: ''
}, {
content: '质量',
description: '',
level: ''
}, {
content: '交期(工期)',
description: '',
level: ''
}, {
content: '成本',
description: '',
level: ''
},{
content: '合作配合情况',
description: '',
level: ''
}],
switchValue: true,
pdfUrl: "",
dialogVisibleContract: false,
baseUrl: process.env.VUE_APP_BASE_API + "/",
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 【请填写功能名称】表格数据
contractList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
contractno: undefined,
contractName: undefined,
contractType: undefined,
contractAmount: undefined,
effectiveDate: undefined,
expirationDate: undefined,
partyA: undefined,
partyB: undefined,
paymentMethod: undefined,
signingDate: undefined,
subjectInformation: undefined,
attachments: undefined,
},
// 表单参数
form: {},
biangeng: [],
// 表单校验
rules: {
contractno: [
{ required: true, message: "合同编号不能为空", trigger: "blur" },
],
contractName: [
{ required: true, message: "合同名称不能为空", trigger: "blur" },
],
contractType: [
{ required: true, message: "合同类型不能为空", trigger: "change" },
],
contractAmount: [
{ required: true, message: "合同金额不能为空", trigger: "blur" },
],
effectiveDate: [
{ required: true, message: "生效日期不能为空", trigger: "blur" },
],
expirationDate: [
{ required: true, message: "到期日期不能为空", trigger: "blur" },
],
partyA: [{ required: true, message: "甲方不能为空", trigger: "blur" }],
partyB: [{ required: true, message: "乙方不能为空", trigger: "blur" }],
paymentMethod: [
{ required: true, message: "付款方式不能为空", trigger: "blur" },
],
signingDate: [
{ required: true, message: "签订日期不能为空", trigger: "blur" },
],
subjectInformation: [
{ required: true, message: "标的物信息不能为空", trigger: "blur" },
],
attachments: [
{ required: true, message: "附件不能为空", trigger: "blur" },
],
reasonChange: [
{ required: true, message: "变更原因不能为空", trigger: "blur" },
],
reasonText: [
{ required: true, message: "变更内容不能为空", trigger: "blur" },
],
id: [{ required: true, message: "不能为空", trigger: "blur" }],
},
showDialogEvaluate:false,
showDialogUploadSealContract:false,
};
},
created() {
this.getList();
},
methods: {
handleUploadSealContract(row){
this.showDialogUploadSealContract = true
this.title = '上传用印合同'
},
beforeUpload(file) {
const isPDF = file.type === 'application/pdf';
const isLt5M = file.size / 1024 / 1024 < 5;
if (!isPDF) {
this.$message.error('只能上传 PDF 文件');
return false;
}
if (!isLt5M) {
this.$message.error('上传文件大小不能超过 5MB');
return false;
}
// 如果需要其他处理,可以在这里添加
return true; // 返回 true 允许上传
},
handleChange(file, fileList) {
this.fileList = fileList;
},
handleSuccess(response, file, fileList) {
// response 是上传成功后的响应数据
// 可以从中获取文件地址或文件名
// 假设后端返回的数据结构中有一个字段 url 表示文件地址
const fileUrl = response.data.fileNames;
// 将文件地址或文件名赋值给表单的字段
this.form.templatefile =fileUrl;
},
handleRemove(file, fileList) {
this.form.templatefile=''
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制上传 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
this.fileList = fileList;
if (file && file.status==="success") {
return this.$confirm(`确定移除 ${file.name}?`);
}
},
handleContractAmount(row){
this.showContractAmount = true
this.title = '进度'
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleAgain":
this.handleAgain(row);
break;
case "handleEvaluate":
this.handleEvaluate(row);
break;
case "handleEdit":
this.handleEdit(row);
break;
case "handleUnbind":
this.handleUnbind(row);
break;
case "handleDelete":
this.handleDelete(row);
break;
case "handleStop":
this.handleStop(row);
break;
default:
break;
}
},
handleUnbind(row){
console.log(row)
},
/** 查询【请填写功能名称】列表 */
getList() {
this.loading = true;
listSealContract(this.queryParams).then((response) => {
this.contractList = response.rows;
this.total = response.total;
this.loading = false;
console.log(this.contractList);
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
//合同附件预览
preview(contract) {
this.dialogVisibleContract = true;
console.log("contract:", contract);
// this.pdfUrl = process.env.VUE_APP_BASE_API+contract;
this.pdfUrl = this.baseUrl+contract;
},
handleClose() {
this.pdfUrl = "";
this.dialogVisibleContract = false;
},
// 表单重置
reset() {
this.form = {
contractno: undefined,
contractName: undefined,
contractType: undefined,
contractAmount: undefined,
effectiveDate: undefined,
expirationDate: undefined,
partyA: undefined,
partyB: undefined,
paymentMethod: undefined,
signingDate: undefined,
subjectInformation: undefined,
attachments: undefined,
reasonChange: undefined,
reasonText: undefined,
id: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 合同变更按钮操作 */
handleEdit(row) {
this.loading = true;
this.reset();
this.biangeng = row;
console.log("变更值:", this.biangeng);
const id = row.id || this.ids;
getContract(id).then((response) => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "合同变更";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateContract(this.form)
.then((response) => {
this.$modal.msgSuccess("合同变更成功,已重新启动流程");
this.open = false;
this.getList();
console.log("变更列表值:", this.biangeng);
this.handleAgain2(this.biangeng);
})
.finally(() => {
this.buttonLoading = false;
this.$router.push({
path: "/contract/compliancemanagement/contractmanagement/contract",
});
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?')
.then(() => {
this.loading = true;
return delContract(ids);
})
.then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {})
.finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/contract/export",
{
...this.queryParams,
},
`contract_${new Date().getTime()}.xlsx`
);
},
/** 流程流转记录 */
handleFlowRecord(row) {
console.log(row);
this.$router.push({
path: "/workflow/process/detail/" + row.procInsId,
query: {
processed: false,
},
});
},
/** 取消流程申请 */
handleStop(row) {
const params = {
procInsId: row.procInsId,
};
stopProcess(params).then((res) => {
this.$modal.msgSuccess(res.msg);
this.getList();
});
},
handleAgain(row) {
console.log(row);
startProcess(row.procDefId, row).then((res) => {
if (res) {
this.$modal.msgSuccess("流程重启动成功");
}
});
// this.$router.push({
// path: "/workflow/process/start/" + row.deployId,
// query: {
// definitionId: row.procDefId,
// procInsId: row.procInsId,
// },
// });
// console.log(row);
},
handleAgain2(row) {
console.log(row);
startProcess(row.procDefId, row).then((res) => {});
},
handleEvaluate(row){
// console.log('评价',row)
this.title = row.contractName
this.showDialogEvaluate = true
},
submitFormEvaluate(){
console.log(this.tableData)
this.showDialogEvaluate = false
},
cancelEvaluate(){
this.showDialogEvaluate = false
}
},
};
</script>
<style>
/* switch按钮样式 */
.switch .el-switch__label {
position: absolute;
display: none;
color: #fff !important;
}
/*打开时文字位置设置*/
.switch .el-switch__label--right {
z-index: 1;
}
/* 调整打开时文字的显示位子 */
.switch .el-switch__label--right span {
margin-right: 9px;
}
/*关闭时文字位置设置*/
.switch .el-switch__label--left {
z-index: 1;
}
/* 调整关闭时文字的显示位子 */
.switch .el-switch__label--left span {
margin-left: 9px;
}
/*显示文字*/
.switch .el-switch__label.is-active {
display: block;
}
/* 调整按钮的宽度 */
.switch.el-switch .el-switch__core,
.el-switch .el-switch__label {
width: 70px !important;
margin: 0;
}
</style>
... ...
... ... @@ -17,7 +17,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
... ... @@ -48,7 +48,7 @@
@click="handleDelete"
v-hasPermi="['system:risksummary:remove']"
>删除</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
... ... @@ -69,7 +69,7 @@
<el-table-column label="存在问题数" align="center" prop="problemsnumber" />
<el-table-column label="整改落实完成情况" align="center" prop="completionnumber" />
<!-- <el-table-column label="" align="center" prop="id" v-if="true"/> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
... ... @@ -86,7 +86,7 @@
v-hasPermi="['system:risksummary:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<pagination
... ...
... ... @@ -56,6 +56,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:add']" -->
<el-col :span="1.5">
<el-button
type="primary"
... ... @@ -63,9 +64,10 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['compliancemanagement:orginfoCertificate:add']"
>新增</el-button>
</el-col>
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:edit']" -->
<el-col :span="1.5">
<el-button
type="success"
... ... @@ -74,9 +76,10 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['compliancemanagement:orginfoCertificate:edit']"
>修改</el-button>
</el-col>
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:remove']" -->
<el-col :span="1.5">
<el-button
type="danger"
... ... @@ -85,9 +88,10 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['compliancemanagement:orginfoCertificate:remove']"
>删除</el-button>
</el-col>
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:export']" -->
<el-col :span="1.5">
<el-button
type="warning"
... ... @@ -95,7 +99,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['compliancemanagement:orginfoCertificate:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
... ... @@ -103,7 +107,6 @@
<el-table v-loading="loading" :data="orginfoCertificateList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" v-if="true"/>
<el-table-column label="单位编号" align="center" prop="orgcode" />
<el-table-column label="证书编号" align="center" prop="certificateNo" />
<el-table-column label="认证机构名称" align="center" prop="certificationName" />
... ... @@ -124,19 +127,21 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:edit']" -->
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['compliancemanagement:orginfoCertificate:edit']"
>修改</el-button>
<!-- v-hasPermi="['compliancemanagement:orginfoCertificate:remove']" -->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['compliancemanagement:orginfoCertificate:remove']"
>删除</el-button>
</template>
</el-table-column>
... ...