|
@@ -60,38 +60,40 @@ import Bus from '@/utils/eventBus/index';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
import { ApplyType } from '@/common/constants/enumCommon';
|
|
import { ApplyType } from '@/common/constants/enumCommon';
|
|
|
import { getBuyOrSellName, getScfContractStatusName } from '@/common/constants/enumsName';
|
|
import { getBuyOrSellName, getScfContractStatusName } from '@/common/constants/enumsName';
|
|
|
|
|
+import { getAccoutIdList } from '@/services/bus/account';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'commodity_contract_bargain',
|
|
name: 'commodity_contract_bargain',
|
|
|
components: {
|
|
components: {
|
|
|
BtnList,
|
|
BtnList,
|
|
|
- // [ModalEnum.commodity_contract_summary_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_summary_settlement/index.vue')),
|
|
|
|
|
- // [ModalEnum.commodity_contract_summary_transfer]: defineAsyncComponent(() => import('./components/commodity_contract_summary_transfer/index.vue')),
|
|
|
|
|
|
|
+ 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_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
|
|
// commodity_contract_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
// 类型 1-我的申请 2-对方申请
|
|
// 类型 1-我的申请 2-对方申请
|
|
|
- const margainType = ref<number>(ApplyType.my);
|
|
|
|
|
|
|
+ const margainType = ref<ApplyType>(ApplyType.my);
|
|
|
// 表格列表数据
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
|
|
const { loading, tableList, queryTable } = queryTableList<QueryTjmdTransferApplyRsp>();
|
|
|
// 交割商品
|
|
// 交割商品
|
|
|
handleDeliveryRelation();
|
|
handleDeliveryRelation();
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
- const queryTableAction = (applytype: ApplyType) => {
|
|
|
|
|
|
|
+ const queryTableAction = () => {
|
|
|
const param: QueryTjmdTransferApplyReq = {
|
|
const param: QueryTjmdTransferApplyReq = {
|
|
|
- applytype,
|
|
|
|
|
|
|
+ applytype: margainType.value,
|
|
|
|
|
+ accountids: getAccoutIdList(),
|
|
|
};
|
|
};
|
|
|
queryTable(queryTjmdTransferApply, param);
|
|
queryTable(queryTjmdTransferApply, param);
|
|
|
};
|
|
};
|
|
|
// 表格通用逻辑
|
|
// 表格通用逻辑
|
|
|
const param: ComposeOrderTableParam = {
|
|
const param: ComposeOrderTableParam = {
|
|
|
- queryFn: () => queryTableAction(1),
|
|
|
|
|
|
|
+ queryFn: () => queryTableAction(),
|
|
|
recordList: getRecordItemTab(),
|
|
recordList: getRecordItemTab(),
|
|
|
};
|
|
};
|
|
|
// 切换 我的申请和对方申请
|
|
// 切换 我的申请和对方申请
|
|
|
Bus.$onOnly('bargain', (value: ApplyType) => {
|
|
Bus.$onOnly('bargain', (value: ApplyType) => {
|
|
|
margainType.value = value;
|
|
margainType.value = value;
|
|
|
- queryTableAction(value);
|
|
|
|
|
|
|
+ queryTableAction();
|
|
|
});
|
|
});
|
|
|
function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
|
|
function handleBtnList(record: QueryTjmdTransferApplyRsp, btnList: BtnListType[]) {
|
|
|
if (record.applystatus === 1) {
|
|
if (record.applystatus === 1) {
|