|
|
@@ -1,32 +1,31 @@
|
|
|
<template>
|
|
|
- <!-- 客户资料 -->
|
|
|
- <div class="plan_uncommitted" :loading="loading">
|
|
|
- <Filter @search="updateColumn">
|
|
|
- <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
|
|
|
- </Filter>
|
|
|
- <a-table :columns="getColumns(columns)" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
- <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
|
|
|
- </template>
|
|
|
- <template #status="{ text }">
|
|
|
- <a>{{ getStatusName(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #userinfotype="{ text }">
|
|
|
- <a>{{ getUserInfoTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
- <template #attachment1="{ text, record }">
|
|
|
- <a>{{ text }}</a
|
|
|
- ><a>{{ record.attachment2 }}</a>
|
|
|
- </template>
|
|
|
- <template #cardtype="{ text }">
|
|
|
- <a>{{ getCardTypeEnumItemName(text) }}</a>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <!-- 右键 -->
|
|
|
- <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
|
|
|
- <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
|
|
|
- </div>
|
|
|
+ <!-- 客户资料 -->
|
|
|
+ <div class="plan_uncommitted" :loading="loading">
|
|
|
+ <Filter @search="updateColumn">
|
|
|
+ <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
|
|
|
+ </Filter>
|
|
|
+ <a-table :columns="getColumns(columns)" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <mtp-table-button class="btn-list-sticky" :buttons="handleBtnList(buttons,record)" :record="record" @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ <template #status="{ text }">
|
|
|
+ <a>{{ getStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #userinfotype="{ text }">
|
|
|
+ <a>{{ getUserInfoTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #attachment1="{ text, record }">
|
|
|
+ <a>{{ text }}</a><a>{{ record.attachment2 }}</a>
|
|
|
+ </template>
|
|
|
+ <template #cardtype="{ text }">
|
|
|
+ <a>{{ getCardTypeEnumItemName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 右键 -->
|
|
|
+ <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
|
|
|
+ <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -41,6 +40,7 @@ import Filter from './compoments/filterTable/index.vue';
|
|
|
import { pingan_custom_column } from './setup';
|
|
|
import { ColumnType } from '@/common/methods/table';
|
|
|
import { getTableColumns } from '@/common/setup/table';
|
|
|
+import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: EnumRouterName.plan_audit,
|
|
|
@@ -80,6 +80,18 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 处理根据状态显示对应按钮
|
|
|
+ const handleBtnList = (btnList: BtnListType[], item: QueryCustomInfoType) => {
|
|
|
+ switch (item.status) {
|
|
|
+ case 2: // 待审核
|
|
|
+ return btnList.filter((e) => e.code !== 'modify');
|
|
|
+ case 5: // 拒绝审核
|
|
|
+ return btnList.filter((e) => e.code !== 'check');
|
|
|
+ default:
|
|
|
+ return btnList;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
// 表头
|
|
|
const getColumns = (columns: ColumnType[]) => {
|
|
|
if (isPingAnOem()) {
|
|
|
@@ -115,6 +127,7 @@ export default defineComponent({
|
|
|
getUserInfoTypeName,
|
|
|
getCardTypeEnumItemName,
|
|
|
getColumns,
|
|
|
+ handleBtnList,
|
|
|
};
|
|
|
},
|
|
|
});
|