作者 雷海东
... ... @@ -24,17 +24,17 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-button
<!--<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>
</el-col>-->
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
... ... @@ -44,7 +44,7 @@
@click="handleUpdate"
v-hasPermi="['system:contract:edit']"
>修改</el-button>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="danger"
... ... @@ -71,47 +71,61 @@
<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" />
<el-table-column label="合同名称" align="center" prop="contractName" />
<el-table-column label="合同类型" align="center" prop="contractType" />
<el-table-column label="合同金额" align="center" prop="contractAmount" />
<el-table-column label="生效日期" align="center" prop="effectiveDate" >
<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" >
<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" />
<el-table-column label="乙方" align="center" prop="partyB" />
<el-table-column label="付款方式" align="center" prop="paymentMethod" />
<el-table-column label="签订日期" align="center" prop="signingDate" >
<el-table-column label="甲方" align="center" prop="partyA" width="200"/>
<el-table-column label="乙方" align="center" prop="partyB" width="200"/>
<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" />
<el-table-column label="附件" align="center" prop="attachments" />
<!-- <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" prop="subjectInformation" width="200" />
<el-table-column label="附件" align="center" prop="attachments" width="100"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:contract:edit']"
>修改</el-button>
<el-button
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-hasPermi="['system:contract:remove']"
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-button
type="text"
size="mini"
icon="el-icon-refresh-right"
v-hasPermi="['workflow:process:start']"
@click="handleAgain(scope.row)"
>重新发起</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -175,17 +189,13 @@
<script>
import { listContract, getContract, delContract, addContract, updateContract } from "@/api/compliancemanagement/contract";
import FileUpload from '@/components/FileUpload';
import { getToken } from "@/utils/auth";
export default {
name: "Contract",
components: {
FileUpload
},
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
... ... @@ -281,6 +291,7 @@ export default {
this.contractList = response.rows;
this.total = response.total;
this.loading = false;
console.log(this.contractList)
});
},
// 取消按钮
... ... @@ -324,23 +335,23 @@ export default {
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加";
},
// handleAdd() {
// this.reset();
// this.open = true;
// this.title = "添加";
// },
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getContract(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改";
});
},
// handleUpdate(row) {
// this.loading = true;
// this.reset();
// 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 => {
... ... @@ -387,6 +398,35 @@ export default {
...this.queryParams
}, `contract_${new Date().getTime()}.xlsx`)
},
/** 流程流转记录 */
handleFlowRecord(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) {
this.$router.push({
path: '/workflow/process/start/' + row.deployId,
query: {
definitionId: row.procDefId,
procInsId: row.procInsId
}
})
console.log(row);
},
}
};
</script>
... ...
... ... @@ -78,7 +78,7 @@ export default {
startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => {
this.$modal.msgSuccess(res.msg);
this.$tab.closeOpenPage({
path: '/work/own'
path: '/technologicalprocess/work/own'
})
})
}
... ...