|
@@ -1,83 +1,90 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <!-- 现货合同: 已完成-->
|
|
|
|
|
- <div class="spot-contract-done">
|
|
|
|
|
- 客户信息: 已完成
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <!-- 现货合同: 已完成-->
|
|
|
|
|
+ <div class="spot-contract-done">
|
|
|
|
|
+ <filterCustomTable @search="search">
|
|
|
|
|
+ <a-button class="operBtn"
|
|
|
|
|
+ v-if="hasPermission('spot_contract_btn_add')"
|
|
|
|
|
+ @click="addAction">新增</a-button>
|
|
|
|
|
+ </filterCustomTable>
|
|
|
|
|
+ <contextMenu :contextMenuList="contextMenuList"
|
|
|
|
|
+ :tableList="spotContractList">
|
|
|
|
|
+ <a-table :columns="columns"
|
|
|
|
|
+ class="topTable"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ rowKey="key"
|
|
|
|
|
+ :data-source="spotContractList">
|
|
|
|
|
+ <!-- <template #userinfotype="{ text }">
|
|
|
|
|
+ <a>{{ text === '2' ? '企业' : '个人'}}</a>
|
|
|
|
|
+ </template> -->
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </contextMenu>
|
|
|
|
|
+ <!-- 新增现货合同 -->
|
|
|
|
|
+ <AddSpotContract />
|
|
|
|
|
+ <!-- 现货合同: 详情 -->
|
|
|
|
|
+ <SpotContractDeatil />
|
|
|
|
|
+ <!-- 现货合同: 修改 -->
|
|
|
|
|
+ <ModifySpotContract />
|
|
|
|
|
+ <!-- 现货合同: 删除 -->
|
|
|
|
|
+ <DeleteSpotContract />
|
|
|
|
|
+ <!-- 现货合同: 重新提交 -->
|
|
|
|
|
+ <ResubmitSpotContract />
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
- import { defineComponent, ref } from 'vue';
|
|
|
|
|
- import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
|
|
|
|
|
- import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
|
|
|
|
|
- import { message } from 'ant-design-vue';
|
|
|
|
|
- import { initData } from '@/common/methods';
|
|
|
|
|
|
|
+import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
|
|
|
|
|
+import { initData } from '@/common/methods';
|
|
|
|
|
+import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
|
|
|
|
|
+import { getCustomList } from '../setup';
|
|
|
|
|
+import { openModal } from '@/common/setup/modal/index';
|
|
|
|
|
+import contextMenu from '@/common/components/contextMenu/index.vue';
|
|
|
|
|
+import { MenuItem } from '@/common/components/contextMenu/interface';
|
|
|
|
|
+import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
|
|
|
|
|
+import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
|
|
+import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
|
|
|
|
|
+import ModifySpotContract from '@/views/information/spot-contract/components/modify/index.vue';
|
|
|
|
|
+import DeleteSpotContract from '@/views/information/spot-contract/components/delete/index.vue';
|
|
|
|
|
+import ResubmitSpotContract from '@/views/information/spot-contract/components/resubmit/index.vue';
|
|
|
|
|
|
|
|
- // 查询客户资料列表
|
|
|
|
|
- function getCustomList() {
|
|
|
|
|
- // const filteredInfo = ref();
|
|
|
|
|
- // const sortedInfo = ref();
|
|
|
|
|
- // const columns = computed(() => {
|
|
|
|
|
- // const filtered = filteredInfo.value || {};
|
|
|
|
|
- // const sorted = sortedInfo.value || {};
|
|
|
|
|
- // return [
|
|
|
|
|
- // {
|
|
|
|
|
- // title: '序号',
|
|
|
|
|
- // dataIndex: 'index',
|
|
|
|
|
- // key: 'index',
|
|
|
|
|
- // align: 'center',
|
|
|
|
|
- // width: 50,
|
|
|
|
|
- // customRender: (param: any) => `${param.index + 1}`,
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // title: 'Age',
|
|
|
|
|
- // dataIndex: 'age',
|
|
|
|
|
- // key: 'age',
|
|
|
|
|
- // sorter: (a: DataItem, b: DataItem) => a.age - b.age,
|
|
|
|
|
- // sortOrder: sorted.columnKey === 'age' && sorted.order,
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // title: 'Address',
|
|
|
|
|
- // dataIndex: 'address',
|
|
|
|
|
- // key: 'address',
|
|
|
|
|
- // filters: [
|
|
|
|
|
- // { text: 'London', value: 'London' },
|
|
|
|
|
- // { text: 'New York', value: 'New York' },
|
|
|
|
|
- // ],
|
|
|
|
|
- // filteredValue: filtered.address || null,
|
|
|
|
|
- // onFilter: (value: string, record: DataItem) => record.address.includes(value),
|
|
|
|
|
- // sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
|
|
|
|
|
- // sortOrder: sorted.columnKey === 'address' && sorted.order,
|
|
|
|
|
- // ellipsis: true,
|
|
|
|
|
- // },
|
|
|
|
|
- // ];
|
|
|
|
|
- // });
|
|
|
|
|
- const customList = ref<QueryCustomInfoType[]>([]);
|
|
|
|
|
- function actionQuery() {
|
|
|
|
|
- QueryCustomInfo(4)
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- console.log('L', res);
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => message.error(err));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+export default defineComponent({
|
|
|
|
|
+ name: 'spot-contract-done',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ filterCustomTable,
|
|
|
|
|
+ contextMenu,
|
|
|
|
|
+ AddSpotContract,
|
|
|
|
|
+ SpotContractDeatil,
|
|
|
|
|
+ ModifySpotContract,
|
|
|
|
|
+ DeleteSpotContract,
|
|
|
|
|
+ ResubmitSpotContract,
|
|
|
|
|
+ },
|
|
|
|
|
+ setup() {
|
|
|
|
|
+ const contextMenuList = ref<MenuItem[]>([]);
|
|
|
|
|
+ const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
|
|
|
|
|
+ const { hasPermission } = handlePermission('spot_contract_unsubmitted');
|
|
|
|
|
+ const { openAction: addAction } = openModal('addSpotContract');
|
|
|
|
|
|
|
|
- return { customList, actionQuery };
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- export default defineComponent({
|
|
|
|
|
- name: 'spot-contract-done',
|
|
|
|
|
- components: {},
|
|
|
|
|
- setup() {
|
|
|
|
|
- const { customList, actionQuery } = getCustomList();
|
|
|
|
|
- initData(() => {
|
|
|
|
|
- actionQuery();
|
|
|
|
|
- // 加载数据在这里
|
|
|
|
|
- });
|
|
|
|
|
- return { customList };
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ detailButton('spotContractDetail', contextMenuList);
|
|
|
|
|
+ const { action: modifyAction } = permissionButton('modifySpotContract', '修改', contextMenuList);
|
|
|
|
|
+ const { action: deleteAction } = permissionButton('deleteSpotContract', '删除', contextMenuList);
|
|
|
|
|
+ const { action: resubmitAction } = permissionButton('resubmitSpotContract', '重新提交', contextMenuList);
|
|
|
|
|
+ const stop = watchEffect(() => {
|
|
|
|
|
+ hasPermission('spot_contract_btn_modify') && modifyAction();
|
|
|
|
|
+ hasPermission('spot_contract_btn_delete') && deleteAction();
|
|
|
|
|
+ hasPermission('spot_contract_btn_resubmit') && resubmitAction();
|
|
|
|
|
+ });
|
|
|
|
|
+ onUnmounted(() => {
|
|
|
|
|
+ stop();
|
|
|
|
|
+ });
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ actionQuery(2);
|
|
|
|
|
+ getColumns();
|
|
|
|
|
+ });
|
|
|
|
|
+ return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
|
|
|
|
|
+ },
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
- .spot-contract-done {
|
|
|
|
|
- }</style
|
|
|
|
|
->;
|
|
|
|
|
|
|
+.spot-contract-done {
|
|
|
|
|
+}
|
|
|
|
|
+</style>;
|