|
|
@@ -3,71 +3,73 @@
|
|
|
<div class="sell-peddding"
|
|
|
:loading="loading">
|
|
|
<filterCustomTable @search="updateColumn">
|
|
|
- <BtnList :btnList="commonBtn" />
|
|
|
+ <BtnList :btnList="firstBtn"
|
|
|
+ @click="openComponent" />
|
|
|
</filterCustomTable>
|
|
|
- <contextMenu :contextMenuList="forDataBtn">
|
|
|
- <a-table :columns="columns"
|
|
|
- class="topTable"
|
|
|
- :pagination="false"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ }">
|
|
|
- <BtnList :btnList="forDataBtn" />
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
+ <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"
|
|
|
+ @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <!-- 右键 -->
|
|
|
+ <contextMenu :contextMenu="contextMenu"
|
|
|
+ @cancel="closeContext"
|
|
|
+ :list="secondBtn">
|
|
|
</contextMenu>
|
|
|
- <!-- 详情 -->
|
|
|
- <Detail :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
- <!-- 采购点价登记 -->
|
|
|
- <SomePrice :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable" />
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ @cancel="closeComponent"></component>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
|
|
|
-import { queryTableList, Ermcp3SellBuyContract } from '../index';
|
|
|
-import { filterCustomTable, Detail, SomePrice } from '../../components';
|
|
|
+import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
+import { QueryWareHouse } from '@/services/go/ermcp/sell';
|
|
|
+import { Ermcp3SellBuyContract } from '@/views/business/purchase/list';
|
|
|
+
|
|
|
+import { filterCustomTable } from '../../components';
|
|
|
+const Detail = defineAsyncComponent(() => import('../../components/detail/index.vue'));
|
|
|
+const SomePrice = defineAsyncComponent(() => import('../../components/someprice/index.vue')); //采购点价登记
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'sell-peddding',
|
|
|
components: {
|
|
|
contextMenu,
|
|
|
filterCustomTable,
|
|
|
- Detail,
|
|
|
- SomePrice,
|
|
|
BtnList,
|
|
|
+ [ModalEnum.detail]: Detail,
|
|
|
+ [ModalEnum.sell_pending_someprice]: SomePrice,
|
|
|
},
|
|
|
setup() {
|
|
|
- // 表头数据
|
|
|
- const { columns, registerColumn, updateColumn } = getTableColumns();
|
|
|
- // 表格事件
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3SellBuyContract>({});
|
|
|
- // 表格操作按钮列表
|
|
|
- const { commonBtn, forDataBtn } = getBtnList('sell_pending', true);
|
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList(2);
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<Ermcp3SellBuyContract>();
|
|
|
+ // 获取列表数据
|
|
|
+ const queryTableAction = () => queryTable(QueryWareHouse, { querytype: 2 });
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ menuType: 'sell_pending',
|
|
|
+ tableName: 'table_pcweb_sales_pointprice',
|
|
|
+ tableFilterKey: ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname'],
|
|
|
+ isDetail: true,
|
|
|
+ };
|
|
|
|
|
|
- initData(() => {
|
|
|
- // 获取列表数据
|
|
|
- queryTable();
|
|
|
- // 注册表头信息 过滤
|
|
|
- registerColumn('table_pcweb_sales_pointprice', ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname']);
|
|
|
- });
|
|
|
return {
|
|
|
- columns,
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick,
|
|
|
- commonBtn,
|
|
|
- forDataBtn,
|
|
|
- loading,
|
|
|
+ ...handleComposeTable<Ermcp3SellBuyContract>(param),
|
|
|
tableList,
|
|
|
- updateColumn,
|
|
|
+ loading,
|
|
|
};
|
|
|
},
|
|
|
});
|