|
|
@@ -1,174 +1,153 @@
|
|
|
<template>
|
|
|
- <!-- 现货合同: 未提交-->
|
|
|
- <div class="spot-contract-not-commit"
|
|
|
- :loading="loading">
|
|
|
- <filterCustomTable @search="search">
|
|
|
- <BtnList :btnList="commonBtn"/>
|
|
|
- </filterCustomTable>
|
|
|
- <contextMenu :contextMenuList="forDataBtn">
|
|
|
- <a-table :columns="columns"
|
|
|
- class="topTable hiddenFirstCol"
|
|
|
- :pagination="false"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ }">
|
|
|
- <BtnList :btnList="forDataBtn"/>
|
|
|
- </template>
|
|
|
- <!-- <template #userinfotype="{ text }">
|
|
|
+ <!-- 现货合同: 未提交-->
|
|
|
+ <div class="spot-contract-not-commit"
|
|
|
+ :loading="loading">
|
|
|
+ <filterCustomTable @search="search">
|
|
|
+ <BtnList :btnList="commonBtn" />
|
|
|
+ </filterCustomTable>
|
|
|
+ <contextMenu :contextMenuList="forDataBtn">
|
|
|
+ <a-table :columns="columns"
|
|
|
+ class="topTable hiddenFirstCol"
|
|
|
+ :pagination="false"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ }">
|
|
|
+ <BtnList :btnList="forDataBtn" />
|
|
|
+ </template>
|
|
|
+ <!-- <template #userinfotype="{ text }">
|
|
|
<a>{{ text === '2' ? '企业' : '个人'}}</a>
|
|
|
</template> -->
|
|
|
- <template #biztype="{ text }">
|
|
|
- <a>{{ getBizTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <template #biztype="{ text }">
|
|
|
+ <a>{{ getBizTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <template #pricetype="{ text }">
|
|
|
- <a>{{ getPriceTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <template #pricetype="{ text }">
|
|
|
+ <a>{{ getPriceTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <template #contracctstatus="{ text }">
|
|
|
- <a>{{ getContractStatusName(text) }}</a>
|
|
|
- </template>
|
|
|
+ <template #contracctstatus="{ text }">
|
|
|
+ <a>{{ getContractStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
|
|
|
- <template #contracttype="{ text }">
|
|
|
- <a>{{ getContractTypeName(text) }}</a>
|
|
|
- </template>
|
|
|
- <!-- 对手方 -->
|
|
|
- <template #negative="{ record }">
|
|
|
- <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
|
|
|
- </template>
|
|
|
- <!-- 点假期 -->
|
|
|
- <template #startdate="{ record }">
|
|
|
- <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
|
|
|
- </template>
|
|
|
- <!-- 交收期 -->
|
|
|
- <template #deliverystartdate="{ record }">
|
|
|
- <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
|
|
|
+ <template #contracttype="{ text }">
|
|
|
+ <a>{{ getContractTypeName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 对手方 -->
|
|
|
+ <template #negative="{ record }">
|
|
|
+ <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 点假期 -->
|
|
|
+ <template #startdate="{ record }">
|
|
|
+ <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- 交收期 -->
|
|
|
+ <template #deliverystartdate="{ record }">
|
|
|
+ <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
|
|
|
formatTime(record.deliveryenddate, "d")) }}</a>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- </contextMenu>
|
|
|
- <!-- 新增现货合同 -->
|
|
|
- <AddSpotContract @refresh="queryTable"/>
|
|
|
- <!-- 现货合同: 详情 -->
|
|
|
- <SpotContractDeatil :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable"/>
|
|
|
- <!-- 现货合同: 修改 -->
|
|
|
- <ModifySpotContract :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable"/>
|
|
|
- <!-- 现货合同: 删除 -->
|
|
|
- <DeleteSpotContract :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable"/>
|
|
|
- <!-- 现货合同: 重新提交 -->
|
|
|
- <ResubmitSpotContract :selectedRow="selectedRow"
|
|
|
- @refresh="queryTable"/>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </contextMenu>
|
|
|
+ <!-- 新增现货合同 -->
|
|
|
+ <AddSpotContract @refresh="queryTable" />
|
|
|
+ <!-- 现货合同: 详情 -->
|
|
|
+ <SpotContractDeatil :selectedRow="selectedRow"
|
|
|
+ @refresh="queryTable" />
|
|
|
+ <!-- 现货合同: 修改 -->
|
|
|
+ <ModifySpotContract :selectedRow="selectedRow"
|
|
|
+ @refresh="queryTable" />
|
|
|
+ <!-- 现货合同: 删除 -->
|
|
|
+ <DeleteSpotContract :selectedRow="selectedRow"
|
|
|
+ @refresh="queryTable" />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
- import {
|
|
|
- defineComponent,
|
|
|
- initData,
|
|
|
- getTableColumns,
|
|
|
- getTableEvent,
|
|
|
- getBtnList,
|
|
|
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
|
|
|
+import { AddSpotContract, SpotContractDeatil, filterCustomTable, ModifySpotContract, DeleteSpotContract } from '../../components';
|
|
|
+
|
|
|
+import { queryTableList, Ermcp3ContractRsp } from '../index';
|
|
|
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
|
|
|
+import { Column, ColumnType } from '@/common/setup/table';
|
|
|
+import { formatTime, formatValue } from '@/common/methods';
|
|
|
+import { handlerManagerList } from '@/common/setup/user';
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: 'spot-contract-not-commit',
|
|
|
+ components: {
|
|
|
+ filterCustomTable,
|
|
|
contextMenu,
|
|
|
- BtnList
|
|
|
- } from '@/common/export/table';
|
|
|
- import {
|
|
|
AddSpotContract,
|
|
|
SpotContractDeatil,
|
|
|
- filterCustomTable,
|
|
|
ModifySpotContract,
|
|
|
DeleteSpotContract,
|
|
|
- ResubmitSpotContract
|
|
|
- } from '../../components';
|
|
|
-
|
|
|
- import {queryTableList, Ermcp3ContractRsp} from '../index';
|
|
|
- import {
|
|
|
- getBizTypeName,
|
|
|
- getContractStatusName,
|
|
|
- getContractTypeName,
|
|
|
- getPriceTypeName
|
|
|
- } from '@/views/information/spot-contract/setup';
|
|
|
- import {Column, ColumnType} from '@/common/setup/table';
|
|
|
- import {formatTime, formatValue} from "@/common/methods";
|
|
|
-
|
|
|
- export default defineComponent({
|
|
|
- name: 'spot-contract-not-commit',
|
|
|
- components: {
|
|
|
- filterCustomTable,
|
|
|
- contextMenu,
|
|
|
- AddSpotContract,
|
|
|
- SpotContractDeatil,
|
|
|
- ModifySpotContract,
|
|
|
- DeleteSpotContract,
|
|
|
- ResubmitSpotContract,
|
|
|
- BtnList,
|
|
|
- },
|
|
|
- setup() {
|
|
|
- // 表头数据
|
|
|
- const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
|
|
|
- // 表格事件
|
|
|
- const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
|
|
|
- // 表格操作按钮列表
|
|
|
- const {commonBtn, forDataBtn} = getBtnList('spot_contract_unsubmitted', true);
|
|
|
- // 表格列表数据
|
|
|
- const {loading, tableList, queryTable} = queryTableList(1);
|
|
|
-
|
|
|
- // 查询
|
|
|
- function search(value: any) {
|
|
|
- filteredInfo.value = value;
|
|
|
- // 更新表信息
|
|
|
- updateColumn();
|
|
|
- }
|
|
|
+ BtnList,
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 表头数据
|
|
|
+ const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
|
|
|
+ // 表格事件
|
|
|
+ const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
|
|
|
+ // 表格操作按钮列表
|
|
|
+ const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList(1);
|
|
|
+ // 获取 业务账户
|
|
|
+ const { queryTable: queryBusinessManager, findManagerName } = handlerManagerList(loading, 1);
|
|
|
+ // 查询
|
|
|
+ function search(value: any) {
|
|
|
+ filteredInfo.value = value;
|
|
|
+ // 更新表信息
|
|
|
+ updateColumn();
|
|
|
+ }
|
|
|
|
|
|
- initData(() => {
|
|
|
- // 获取列表数据
|
|
|
- queryTable();
|
|
|
- // 注册表头信息 过滤
|
|
|
- registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
|
|
|
- if (e.columntitle === '对手方') {
|
|
|
- item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
|
|
|
- if (record.contracttype === 1) {
|
|
|
- //采购方
|
|
|
- return record.sellusername.includes(value);
|
|
|
- } else {
|
|
|
- // 销售
|
|
|
- return record.buyusername.includes(value);
|
|
|
- }
|
|
|
- };
|
|
|
- item.filteredValue = filtered.negative || null;
|
|
|
- }
|
|
|
- });
|
|
|
+ initData(() => {
|
|
|
+ // 获取列表数据
|
|
|
+ queryTable();
|
|
|
+ // 注册表头信息 过滤
|
|
|
+ registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
|
|
|
+ if (e.columntitle === '对手方') {
|
|
|
+ item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
|
|
|
+ if (record.contracttype === 1) {
|
|
|
+ //采购方
|
|
|
+ return record.sellusername.includes(value);
|
|
|
+ } else {
|
|
|
+ // 销售
|
|
|
+ return record.buyusername.includes(value);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ item.filteredValue = filtered.negative || null;
|
|
|
+ }
|
|
|
});
|
|
|
- return {
|
|
|
- columns,
|
|
|
- filteredInfo,
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick,
|
|
|
- commonBtn,
|
|
|
- forDataBtn,
|
|
|
- loading,
|
|
|
- tableList,
|
|
|
- search,
|
|
|
- queryTable,
|
|
|
- getBizTypeName,
|
|
|
- getPriceTypeName,
|
|
|
- getContractStatusName,
|
|
|
- getContractTypeName,
|
|
|
- formatTime,
|
|
|
- formatValue,
|
|
|
- };
|
|
|
- },
|
|
|
- });
|
|
|
+ queryBusinessManager();
|
|
|
+ });
|
|
|
+ return {
|
|
|
+ columns,
|
|
|
+ filteredInfo,
|
|
|
+ expandedRowKeys,
|
|
|
+ selectedRow,
|
|
|
+ Rowclick,
|
|
|
+ commonBtn,
|
|
|
+ forDataBtn,
|
|
|
+ loading,
|
|
|
+ tableList,
|
|
|
+ search,
|
|
|
+ queryTable,
|
|
|
+ getBizTypeName,
|
|
|
+ getPriceTypeName,
|
|
|
+ getContractStatusName,
|
|
|
+ getContractTypeName,
|
|
|
+ formatTime,
|
|
|
+ formatValue,
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
- .spot-contract-not-commit {
|
|
|
- }
|
|
|
+.spot-contract-not-commit {
|
|
|
+}
|
|
|
</style
|
|
|
>;
|