|
@@ -1,41 +1,44 @@
|
|
|
<template>
|
|
<template>
|
|
|
<!-- 商品订单 - 议价单 -->
|
|
<!-- 商品订单 - 议价单 -->
|
|
|
<section>
|
|
<section>
|
|
|
- <a-table :columns="columns"
|
|
|
|
|
- class="srcollYTable expandLeftTable"
|
|
|
|
|
- :scroll="{ x: '100%', y: '190px' }"
|
|
|
|
|
- :pagination="false"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
|
|
- :customRow="Rowclick"
|
|
|
|
|
- :expandIcon="expandIcon"
|
|
|
|
|
- :expandIconAsCell="false"
|
|
|
|
|
- rowKey="key"
|
|
|
|
|
- :data-source="tableList">
|
|
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ class="srcollYTable expandLeftTable"
|
|
|
|
|
+ :scroll="{ x: '100%', y: '190px' }"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
|
|
+ :customRow="Rowclick"
|
|
|
|
|
+ :expandIcon="expandIcon"
|
|
|
|
|
+ :expandIconAsCell="false"
|
|
|
|
|
+ rowKey="key"
|
|
|
|
|
+ :data-source="tableList"
|
|
|
|
|
+ >
|
|
|
<!-- 额外的展开行 -->
|
|
<!-- 额外的展开行 -->
|
|
|
- <template v-if="btnList.length"
|
|
|
|
|
- #expandedRowRender="{ record }">
|
|
|
|
|
- <BtnList :btnList="handleBtnList(record, btnList)"
|
|
|
|
|
- :record="record"
|
|
|
|
|
- class="btn-list-sticky"
|
|
|
|
|
- @click="openComponent" />
|
|
|
|
|
|
|
+ <template v-if="btnList.length" #expandedRowRender="{ record }">
|
|
|
|
|
+ <BtnList
|
|
|
|
|
+ :btnList="handleBtnList(record, btnList)"
|
|
|
|
|
+ :record="record"
|
|
|
|
|
+ class="btn-list-sticky"
|
|
|
|
|
+ @click="openComponent"
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
<template #applytime="{ text }">
|
|
<template #applytime="{ text }">
|
|
|
<span>{{ formatTime(text) }}</span>
|
|
<span>{{ formatTime(text) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
- <template #transferamount="{ record , text}">
|
|
|
|
|
|
|
+ <template #transferamount="{ record, text }">
|
|
|
<div>
|
|
<div>
|
|
|
<!-- 审核拒绝 -->
|
|
<!-- 审核拒绝 -->
|
|
|
- <a-tooltip placement="bottom"
|
|
|
|
|
- v-if="record.applystatus === 4"
|
|
|
|
|
- overlayClassName="toolTipTableColumn">
|
|
|
|
|
|
|
+ <a-tooltip
|
|
|
|
|
+ placement="bottom"
|
|
|
|
|
+ v-if="record.applystatus === 4"
|
|
|
|
|
+ overlayClassName="toolTipTableColumn"
|
|
|
|
|
+ >
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<span>{{ getScfContractStatusName(text) }}</span>
|
|
<span>{{ getScfContractStatusName(text) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
- <span
|
|
|
|
|
- :class="record.applystatus === 4 ? 'red' : 'white'">{{ record.transferamount }}</span>
|
|
|
|
|
- <ExclamationCircleOutlined class="ml10 red"
|
|
|
|
|
- v-if="record.applystatus === 4" />
|
|
|
|
|
|
|
+ <span :class="record.applystatus === 4 ? 'red' : 'white'">{{ record.transferamount }}</span>
|
|
|
|
|
+ <ExclamationCircleOutlined class="ml10 red" v-if="record.applystatus === 4" />
|
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
|
<span v-else>{{ record.transferamount }}</span>
|
|
<span v-else>{{ record.transferamount }}</span>
|
|
|
</div>
|
|
</div>
|
|
@@ -47,11 +50,13 @@
|
|
|
<span>{{ getScfContractStatusName(text) }}</span>
|
|
<span>{{ getScfContractStatusName(text) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
- <component :is="componentId"
|
|
|
|
|
- v-if="componentId"
|
|
|
|
|
- :selectedRow="selectedRow"
|
|
|
|
|
- :tableList="tableList"
|
|
|
|
|
- @cancel="closeComponent"></component>
|
|
|
|
|
|
|
+ <component
|
|
|
|
|
+ :is="componentId"
|
|
|
|
|
+ v-if="componentId"
|
|
|
|
|
+ :selectedRow="selectedRow"
|
|
|
|
|
+ :tableList="tableList"
|
|
|
|
|
+ @cancel="closeComponent"
|
|
|
|
|
+ ></component>
|
|
|
</section>
|
|
</section>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -76,64 +81,64 @@ import { ref } from 'vue';
|
|
|
import { columns } from './setup';
|
|
import { columns } from './setup';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'commodity_contract_bargain',
|
|
|
|
|
- components: {
|
|
|
|
|
- ExclamationCircleOutlined,
|
|
|
|
|
- BtnList,
|
|
|
|
|
- commodity_contract_bargain_submit_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_submit_order/index.vue')),
|
|
|
|
|
- commodity_contract_bargain_cancel_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_cancel_order/index.vue')),
|
|
|
|
|
- commodity_contract_bargain_refuse_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_refuse_order/index.vue')),
|
|
|
|
|
- },
|
|
|
|
|
- setup() {
|
|
|
|
|
- // 类型 1-我的申请 2-对方申请
|
|
|
|
|
- const margainType = ref<ApplyType>(ApplyType.my);
|
|
|
|
|
- // 表格列表数据
|
|
|
|
|
- const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
|
|
|
|
|
- // 交割商品
|
|
|
|
|
- handleDeliveryRelation();
|
|
|
|
|
- // 获取列表数据
|
|
|
|
|
- const queryTableAction = () => {
|
|
|
|
|
- const param: QueryTjmdTransferApplyReq = {
|
|
|
|
|
- applytype: margainType.value,
|
|
|
|
|
- accountids: getAccoutIdList(),
|
|
|
|
|
- };
|
|
|
|
|
- queryTable(queryTjmdTransferApply, param);
|
|
|
|
|
- };
|
|
|
|
|
- // 表格通用逻辑
|
|
|
|
|
- const param: ComposeOrderTableParam = {
|
|
|
|
|
- queryFn: () => queryTableAction(),
|
|
|
|
|
- recordList: getRecordItemTab(),
|
|
|
|
|
- };
|
|
|
|
|
- // 切换 我的申请和对方申请
|
|
|
|
|
- Bus.$onOnly('bargain', (value: ApplyType) => {
|
|
|
|
|
- margainType.value = value;
|
|
|
|
|
- queryTableAction();
|
|
|
|
|
- });
|
|
|
|
|
- function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
|
|
|
|
|
- if (record.applystatus === 1) {
|
|
|
|
|
- if (margainType.value === ApplyType.my) {
|
|
|
|
|
- // 我的申请
|
|
|
|
|
- return btnList.filter((e) => e.code === 'commodity_contract_bargain_cancel_order');
|
|
|
|
|
- } else {
|
|
|
|
|
- // 对方的申请
|
|
|
|
|
- return btnList.filter((e) => e.code !== 'commodity_contract_bargain_cancel_order');
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- return [];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ name: 'commodity_contract_bargain',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ ExclamationCircleOutlined,
|
|
|
|
|
+ BtnList,
|
|
|
|
|
+ commodity_contract_bargain_submit_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_submit_order/index.vue')),
|
|
|
|
|
+ commodity_contract_bargain_cancel_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_cancel_order/index.vue')),
|
|
|
|
|
+ commodity_contract_bargain_refuse_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_refuse_order/index.vue')),
|
|
|
|
|
+ },
|
|
|
|
|
+ setup() {
|
|
|
|
|
+ // 类型 1-我的申请 2-对方申请
|
|
|
|
|
+ const margainType = ref<ApplyType>(ApplyType.my);
|
|
|
|
|
+ // 表格列表数据
|
|
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
|
|
|
|
|
+ // 交割商品
|
|
|
|
|
+ handleDeliveryRelation();
|
|
|
|
|
+ // 获取列表数据
|
|
|
|
|
+ const queryTableAction = () => {
|
|
|
|
|
+ const param: QueryTjmdTransferApplyReq = {
|
|
|
|
|
+ applytype: margainType.value,
|
|
|
|
|
+ accountids: getAccoutIdList(),
|
|
|
|
|
+ };
|
|
|
|
|
+ queryTable(queryTjmdTransferApply, param);
|
|
|
|
|
+ };
|
|
|
|
|
+ // 表格通用逻辑
|
|
|
|
|
+ const param: ComposeOrderTableParam = {
|
|
|
|
|
+ queryFn: () => queryTableAction(),
|
|
|
|
|
+ recordList: getRecordItemTab(),
|
|
|
|
|
+ };
|
|
|
|
|
+ // 切换 我的申请和对方申请
|
|
|
|
|
+ Bus.$onOnly('bargain', (value: ApplyType) => {
|
|
|
|
|
+ margainType.value = value;
|
|
|
|
|
+ queryTableAction();
|
|
|
|
|
+ });
|
|
|
|
|
+ function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
|
|
|
|
|
+ if (record.applystatus === 1) {
|
|
|
|
|
+ if (margainType.value === ApplyType.my) {
|
|
|
|
|
+ // 我的申请
|
|
|
|
|
+ return btnList.filter((e) => e.code === 'swap_commodity_contract_bargain_cancel_order');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 对方的申请
|
|
|
|
|
+ return btnList.filter((e) => e.code !== 'swap_commodity_contract_bargain_cancel_order');
|
|
|
}
|
|
}
|
|
|
- return {
|
|
|
|
|
- ...handleComposeOrderTable<QueryTradePositionRsp>(param),
|
|
|
|
|
- columns,
|
|
|
|
|
- loading,
|
|
|
|
|
- tableList,
|
|
|
|
|
- formatTime,
|
|
|
|
|
- expandIcon,
|
|
|
|
|
- handleBtnList,
|
|
|
|
|
- getBuyOrSellName,
|
|
|
|
|
- getScfContractStatusName,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...handleComposeOrderTable<QueryTradePositionRsp>(param),
|
|
|
|
|
+ columns,
|
|
|
|
|
+ loading,
|
|
|
|
|
+ tableList,
|
|
|
|
|
+ formatTime,
|
|
|
|
|
+ expandIcon,
|
|
|
|
|
+ handleBtnList,
|
|
|
|
|
+ getBuyOrSellName,
|
|
|
|
|
+ getScfContractStatusName,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|