|
|
@@ -1,69 +1,42 @@
|
|
|
<template>
|
|
|
- <!-- 采购: 全部-->
|
|
|
- <div class="purchase-all"
|
|
|
- :loading="loading">
|
|
|
- <filterCustomTable @search="updateColumn">
|
|
|
- <BtnList :btnList="firstBtn"
|
|
|
- @click="openComponent" />
|
|
|
- </filterCustomTable>
|
|
|
- <a-table :columns="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 }">
|
|
|
- <BtnList :btnList="secondBtn"
|
|
|
- :record="record"
|
|
|
- class="btn-list-sticky"
|
|
|
- @click="openComponent" />
|
|
|
- </template>
|
|
|
- <template #contracctstatus="{ record }">
|
|
|
- <a>{{
|
|
|
- getContractStatusName(record.contracctstatus) }}</a>
|
|
|
- </template>
|
|
|
- <template #pricedqty="{ text, record }">
|
|
|
- <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
- </template>
|
|
|
- <template #unsureqty="{ text, record }">
|
|
|
- <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
- </template>
|
|
|
- <template #qty="{ text, record }">
|
|
|
- <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
- </template>
|
|
|
- <template #unpricedqty="{ text, record }">
|
|
|
- <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
- </template>
|
|
|
- <template #deliverystartdate,deliveryenddate="{ record }">
|
|
|
- <span>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
|
|
|
- formatTime(record.deliveryenddate, "d")) }}</span>
|
|
|
- </template>
|
|
|
- <template #startdate,enddate="{ record }">
|
|
|
- <span>{{ formatValue(formatTime(record.startdate, "d") + '--' +
|
|
|
- formatTime(record.enddate, "d")) }}</span>
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </a-table>
|
|
|
- <!-- 右键 -->
|
|
|
- <contextMenu :contextMenu="contextMenu"
|
|
|
- @cancel="closeContext"
|
|
|
- :list="secondBtn">
|
|
|
- </contextMenu>
|
|
|
- <component :is="componentId"
|
|
|
- v-if="componentId"
|
|
|
- :selectedRow="selectedRow"
|
|
|
- @cancel="closeComponent"></component>
|
|
|
- </div>
|
|
|
+ <!-- 采购: 全部-->
|
|
|
+ <div class="purchase-all" :loading="loading">
|
|
|
+ <filterCustomTable @search="updateColumn"></filterCustomTable>
|
|
|
+ <a-table :columns="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 #contracctstatus="{ record }">
|
|
|
+ <a>{{ getContractStatusName(record.contracctstatus) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #pricedqty="{ text, record }">
|
|
|
+ <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #unsureqty="{ text, record }">
|
|
|
+ <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #qty="{ text, record }">
|
|
|
+ <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #unpricedqty="{ text, record }">
|
|
|
+ <span>{{ handleEnumdic(text, record) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #deliverystartdate,deliveryenddate="{ record }">
|
|
|
+ <span>{{ formatValue(formatTime(record.deliverystartdate, 'd') + '--' + formatTime(record.deliveryenddate, 'd')) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #startdate,enddate="{ record }">
|
|
|
+ <span>{{ formatValue(formatTime(record.startdate, 'd') + '--' + formatTime(record.enddate, 'd')) }}</span>
|
|
|
+ </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">
|
|
|
-import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
+import { queryTableList, MtpTableButton, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
|
|
|
import { Ermcp3SellBuyContract } from '../index';
|
|
|
import { filterCustomTable } from '../../components';
|
|
|
@@ -71,7 +44,8 @@ import { QueryPurchase } from '@/services/go/ermcp/purchase';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
import { getContractStatusName } from '@/common/constants/enumsName';
|
|
|
import { handleEnumdic } from '../setup';
|
|
|
-import {formatTime, formatValue} from "@/common/methods";
|
|
|
+import { formatTime, formatValue } from '@/common/methods';
|
|
|
+import { getTableButton } from '@/common/setup/table/button';
|
|
|
|
|
|
const Detail = defineAsyncComponent(() => import('../../components/detail/index.vue'));
|
|
|
const Settlement = defineAsyncComponent(() => import('../../components/settlement/index.vue')); //交收登记
|
|
|
@@ -86,19 +60,16 @@ export default defineComponent({
|
|
|
contextMenu,
|
|
|
filterCustomTable,
|
|
|
Detail,
|
|
|
- BtnList,
|
|
|
+ MtpTableButton,
|
|
|
[ModalEnum.detail]: Detail,
|
|
|
- [ModalEnum.purchase_pending_settlement]: Settlement,
|
|
|
- [ModalEnum.purchase_pending_funds]: Funds,
|
|
|
- [ModalEnum.purchase_pending_invoice]: Invoice,
|
|
|
- [ModalEnum.purchase_pending_storage]: Storage,
|
|
|
- [ModalEnum.purchase_pending_someprice]: SomePrice,
|
|
|
},
|
|
|
setup() {
|
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<Ermcp3SellBuyContract>();
|
|
|
+
|
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => queryTable(QueryPurchase, { querytype: 1 });
|
|
|
+
|
|
|
// 表格通用逻辑
|
|
|
const param: ComposeTableParam = {
|
|
|
queryFn: queryTableAction,
|
|
|
@@ -107,6 +78,9 @@ export default defineComponent({
|
|
|
tableFilterKey: ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname'],
|
|
|
isDetail: true,
|
|
|
};
|
|
|
+
|
|
|
+ const buttons = getTableButton([ModalEnum.detail]);
|
|
|
+
|
|
|
return {
|
|
|
...handleComposeTable<Ermcp3SellBuyContract>(param),
|
|
|
tableList,
|
|
|
@@ -114,14 +88,9 @@ export default defineComponent({
|
|
|
getContractStatusName,
|
|
|
handleEnumdic,
|
|
|
formatTime,
|
|
|
- formatValue
|
|
|
+ formatValue,
|
|
|
+ buttons,
|
|
|
};
|
|
|
},
|
|
|
});
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less">
|
|
|
-.purchase-history {
|
|
|
-}
|
|
|
-</style
|
|
|
->;
|
|
|
+</script>
|