|
|
@@ -0,0 +1,322 @@
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-card shadow="never" v-loading="loading">
|
|
|
+ <search-table @search="reload"></search-table>
|
|
|
+ <!-- 数据表格 -->
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ height="calc(100vh - 325px)"
|
|
|
+ full-height="calc(100vh - 116px)"
|
|
|
+ tool-class="ele-toolbar-form"
|
|
|
+ :selection.sync="selection"
|
|
|
+ :page-size="20"
|
|
|
+ @columns-change="handleColumnChange"
|
|
|
+ :cache-key="cacheKeyUrl"
|
|
|
+ >
|
|
|
+ <!-- 查看详情列 -->
|
|
|
+ <template v-slot:reason="{ row }">
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="handleAddOrEdit(row, 'view')"
|
|
|
+ >
|
|
|
+ {{ row.reason }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <!-- 查看详情列 -->
|
|
|
+ <template v-slot:contractName="{ row }">
|
|
|
+ <el-link type="primary" :underline="false" @click="openDetail(row)">
|
|
|
+ {{ row.contractName }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="handleAddOrEdit('', 'add')"
|
|
|
+ v-if="$hasPermission('eom:changerecord:save')"
|
|
|
+ >
|
|
|
+ 新建
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleAddOrEdit(row, 'update')"
|
|
|
+ v-if="
|
|
|
+ [0, 3].includes(row.approvalStatus) &&
|
|
|
+ $hasPermission('eom:changerecord:update')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </el-link>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ v-if="[0, 3].includes(row.approvalStatus)"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="sub(row)"
|
|
|
+ >
|
|
|
+ 提交
|
|
|
+ </el-link>
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除此信息吗?"
|
|
|
+ @confirm="remove([row.id])"
|
|
|
+ v-if="
|
|
|
+ [0, 3].includes(row.approvalStatus) &&
|
|
|
+ $hasPermission('eom:changerecord:delete')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <add-or-edit-dialog
|
|
|
+ ref="addOrEditDialogRef"
|
|
|
+ @reload="reload"
|
|
|
+ ></add-or-edit-dialog>
|
|
|
+ <process-submit-dialog
|
|
|
+ :processSubmitDialogFlag.sync="processSubmitDialogFlag"
|
|
|
+ v-if="processSubmitDialogFlag"
|
|
|
+ ref="processSubmitDialogRef"
|
|
|
+ @reload="reload"
|
|
|
+ ></process-submit-dialog>
|
|
|
+ <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import addOrEditDialog from './components/addOrEditDialog.vue';
|
|
|
+ import searchTable from './components/searchTable.vue';
|
|
|
+ import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
+ import { reviewStatus } from '@/enum/dict';
|
|
|
+
|
|
|
+ import { getTableList, deleteInformation } from '@/api/changeManage/index.js';
|
|
|
+ import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ import detailDialog from '@/views/contractManage/contractBook/components/detailDialog1.vue';
|
|
|
+ import { relationTypeList } from '@/enum/dict.js';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ mixins: [tabMixins],
|
|
|
+ components: {
|
|
|
+ addOrEditDialog,
|
|
|
+ searchTable,
|
|
|
+ processSubmitDialog,
|
|
|
+ detailDialog
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
+ delVisible: false,
|
|
|
+ addOrEditDialogFlag: false,
|
|
|
+ processSubmitDialogFlag: false,
|
|
|
+ selection: [],
|
|
|
+ cacheKeyUrl: 'eos-6f5d0bf2-changeManage',
|
|
|
+ columnsVersion: 1
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns() {
|
|
|
+ // 当columnsVersion变化时会重新计算,用作更新列配置
|
|
|
+ const version = this.columnsVersion;
|
|
|
+ return [
|
|
|
+ // {
|
|
|
+ // width: 45,
|
|
|
+ // type: 'selection',
|
|
|
+ // columnKey: 'selection',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ width: 60,
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // width: 160,
|
|
|
+ // prop: 'changeCode',
|
|
|
+ // label: '编码',
|
|
|
+ // align: 'center',
|
|
|
+ // slot: 'changeCode',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ idth: 150,
|
|
|
+ prop: 'relationType',
|
|
|
+ label: '来源类型',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return relationTypeList.find(
|
|
|
+ (item) => item.value == _row.relationType
|
|
|
+ )?.label;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 160,
|
|
|
+ prop: 'relationCode',
|
|
|
+ label: '来源编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 200,
|
|
|
+ prop: 'relationName',
|
|
|
+ label: '来源名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 200,
|
|
|
+ prop: 'reason',
|
|
|
+ label: '变更原因',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'reason',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ minWidth: 200,
|
|
|
+ prop: 'remark',
|
|
|
+ label: '变更描述',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'approvalStatus',
|
|
|
+ label: '审核状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return reviewStatus[_row.approvalStatus];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 100,
|
|
|
+ prop: 'createUserName',
|
|
|
+ label: '创建人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 100,
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 180,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ //新增、修改
|
|
|
+ handleAddOrEdit(row = {}, type) {
|
|
|
+ this.$refs.addOrEditDialogRef.open(row, type);
|
|
|
+ },
|
|
|
+ //新增、修改
|
|
|
+ handleDetail(row = {}, type) {
|
|
|
+ this.detailDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.detailDialogRef.init(row, type);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查看详情
|
|
|
+ openDetail(row) {
|
|
|
+ this.$refs.contactDetailDialogRef.open({ id: row.contractId });
|
|
|
+ },
|
|
|
+ /* 表格数据源 */
|
|
|
+ datasource({ page, limit, where, order }) {
|
|
|
+ return getTableList({
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ ...where
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where = {}) {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ },
|
|
|
+
|
|
|
+ remove(row) {
|
|
|
+ deleteInformation(row).then((res) => {
|
|
|
+ this.$message.success('删除成功!');
|
|
|
+ this.reload();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ sub(res) {
|
|
|
+ this.processSubmitDialogFlag = true;
|
|
|
+ let key = 'erp_chanagerecord_approve';
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let params = {
|
|
|
+ businessId: res.id,
|
|
|
+ businessKey: key,
|
|
|
+ formCreateUserId: res.createUserId,
|
|
|
+ variables: {
|
|
|
+ businessCode: res.relationCode,
|
|
|
+ businessName:
|
|
|
+ relationTypeList.find((item) => item.value == res.relationType)
|
|
|
+ ?.label + '变更',
|
|
|
+ businessType: relationTypeList.find(
|
|
|
+ (item) => item.value == res.relationType
|
|
|
+ )?.label
|
|
|
+ }
|
|
|
+ };
|
|
|
+ this.$refs.processSubmitDialogRef.init(params);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ :deep(.el-link--inner) {
|
|
|
+ margin-left: 0px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sys-organization-list {
|
|
|
+ height: calc(100vh - 264px);
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-width: 1px;
|
|
|
+ border-style: solid;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sys-organization-list :deep(.el-tree-node__content) {
|
|
|
+ height: 40px;
|
|
|
+
|
|
|
+ & > .el-tree-node__expand-icon {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|