Prechádzať zdrojové kódy

采购: 履约交收

huangbin 4 rokov pred
rodič
commit
e1f6e515bf
22 zmenil súbory, kde vykonal 130 pridanie a 115 odobranie
  1. 1 1
      src/common/setup/modal/modal.ts
  2. 6 4
      src/views/business/purchase/components/detail/index.vue
  3. 10 8
      src/views/business/purchase/components/funds/index.vue
  4. 15 14
      src/views/business/purchase/components/invoice/index.vue
  5. 4 4
      src/views/business/purchase/components/settlement/index.vue
  6. 19 24
      src/views/business/purchase/components/storage/index.vue
  7. 60 58
      src/views/business/purchase/list/performance/index.vue
  8. 1 0
      src/views/information/account_info/compoments/add-business/index.vue
  9. 1 0
      src/views/information/account_info/compoments/cancel-business/index.vue
  10. 1 0
      src/views/information/account_info/compoments/detail-business/index.vue
  11. 1 0
      src/views/information/account_info/compoments/locked-business/index.vue
  12. 1 0
      src/views/information/account_info/compoments/modify-business/index.vue
  13. 1 0
      src/views/information/account_info/compoments/reset-business/index.vue
  14. 1 0
      src/views/information/account_info/compoments/unlocked-business/index.vue
  15. 1 0
      src/views/information/spot-contract/components/add/index.vue
  16. 1 0
      src/views/information/spot-contract/components/cancel/index.vue
  17. 1 0
      src/views/information/spot-contract/components/check/index.vue
  18. 1 0
      src/views/information/spot-contract/components/delete/index.vue
  19. 1 0
      src/views/information/spot-contract/components/detail/index.vue
  20. 1 1
      src/views/information/spot-contract/components/finish/index.vue
  21. 1 0
      src/views/information/spot-contract/components/modify/index.vue
  22. 1 1
      src/views/platinum/platinum_agreement/compoments/modify/index.vue

+ 1 - 1
src/common/setup/modal/modal.ts

@@ -53,7 +53,7 @@ export function openModal(modelName: keyof ModalName, data?: any) {
 
 export type { ModalName };
 
-export function _closeModal(context: SetupContext<any>) {
+export function _closeModal(context: SetupContext<'cancel'[]>) {
     const visible = ref<boolean>(true);
     /**
      * 关闭弹窗

+ 6 - 4
src/views/business/purchase/components/detail/index.vue

@@ -43,7 +43,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="合同签署量">
-              <span class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
+              <span
+                    class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -95,22 +96,23 @@
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
 import { formatValue } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/common/constants/enumsName';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'purchase_pending-detail',
     components: {},
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3SellBuyContract>,
             default: {},
         },
     },
-    setup() {
-        const { visible, cancel } = closeModal('detail');
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
 
         function submit() {

+ 10 - 8
src/views/business/purchase/components/funds/index.vue

@@ -47,7 +47,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="暂定价货款总额">
-              <span class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
+              <span
+                    class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -73,7 +74,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="货款总额">
-              <span class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
+              <span
+                    class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -163,17 +165,18 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, unref, watch, watchEffect } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { formatValue, initData } from '@/common/methods';
+import { defineComponent, PropType, ref, unref } from 'vue';
+import { formatValue } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/common/constants/enumsName';
 import { fundsReq } from '@/views/business/purchase/components/setup';
 import { handleForm } from './setup';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'purchase_pending_funds',
     components: {},
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3SellBuyContract>,
@@ -181,7 +184,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('purchase_pending_funds');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
         function submit() {
@@ -196,8 +199,7 @@ export default defineComponent({
                 }
                 // 发出发票登记
                 fundsReq(props.selectedRow.spotcontractid, params, loading, formState.Remark).then(() => {
-                    cancel();
-                    context.emit('refresh');
+                    cancel(true);
                 });
             });
         }

+ 15 - 14
src/views/business/purchase/components/invoice/index.vue

@@ -52,17 +52,20 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="贷款总额">
-              <span class="white">{{ formatValue(selectedRow.loanamount) + selectedRow.currencyname }}</span>
+              <span
+                    class="white">{{ formatValue(selectedRow.loanamount) + selectedRow.currencyname }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="保证金">
-              <span class="white">{{ formatValue(selectedRow.margin) + selectedRow.currencyname }}</span>
+              <span
+                    class="white">{{ formatValue(selectedRow.margin) + selectedRow.currencyname }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="其他费用">
-              <span class="white">{{ selectedRow.reckonotheramount + selectedRow.currencyname }}</span>
+              <span
+                    class="white">{{ selectedRow.reckonotheramount + selectedRow.currencyname }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -82,7 +85,8 @@
           </a-col>
           <a-col :span="24">
             <a-form-item label="预收票额">
-              <span class="white">{{ selectedRow.preinvoiceamount + selectedRow.currencyname }}</span>
+              <span
+                    class="white">{{ selectedRow.preinvoiceamount + selectedRow.currencyname }}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -128,21 +132,19 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, unref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, PropType, ref, unref } from 'vue';
 import { formatValue } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/common/constants/enumsName';
-import { operationContractReq } from '@/services/proto/contract';
-import { message } from 'ant-design-vue';
-import { objectToUint8Array } from '@/utils/objHandle';
-import { InvoiceReq, SettlementReq } from '@/services/proto/contract/interface';
-import { invoiceReq, settlementReq } from '@/views/business/purchase/components/setup';
+import { InvoiceReq } from '@/services/proto/contract/interface';
+import { invoiceReq } from '@/views/business/purchase/components/setup';
 import { handleForm } from './setup';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'purchase_pending_invoice',
     components: {},
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3SellBuyContract>,
@@ -150,7 +152,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('purchase_pending_invoice');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
         function submit() {
@@ -163,8 +165,7 @@ export default defineComponent({
                 // 发出发票登记
                 invoiceReq(props.selectedRow.spotcontractid, params, loading)
                     .then(() => {
-                        cancel();
-                        context.emit('refresh');
+                        cancel(true);
                     })
                     .catch((err) => {});
             });

+ 4 - 4
src/views/business/purchase/components/settlement/index.vue

@@ -310,17 +310,18 @@
 
 <script lang="ts">
 import { defineComponent, PropType, ref, unref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
 import { formatValue } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/common/constants/enumsName';
 import { settlementReq } from '@/views/business/purchase/components/setup';
 import { SettlementReq } from '@/services/proto/contract/interface';
 import { handleForm } from './setup';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'purchase_pending_settlement',
     components: {},
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3SellBuyContract>,
@@ -328,7 +329,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('purchase_pending_settlement');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const { rules, formState, formRef, checkedObj } = handleForm();
 
@@ -375,8 +376,7 @@ export default defineComponent({
                 // 发出交收请求
                 settlementReq(props.selectedRow.spotcontractid, param, loading)
                     .then(() => {
-                        cancel();
-                        context.emit('refresh');
+                        cancel(true);
                     })
                     .catch((err) => {});
             });

+ 19 - 24
src/views/business/purchase/components/storage/index.vue

@@ -83,7 +83,8 @@
                         readonly>
                 <a-select-option v-for="option in gmlist"
                                  :key="option.wrstandardid"
-                                 :value="option.wrstandardid">{{option.wrstandardname}}</a-select-option>
+                                 :value="option.wrstandardid">{{option.wrstandardname}}
+                </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -131,8 +132,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref, unref, watchEffect } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, PropType, ref, unref } from 'vue';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { ERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
 import { QueryAreaStockApply, QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
@@ -140,15 +140,16 @@ import * as Long from 'long';
 import { formatValue } from '@/common/methods';
 import { handleForm } from './setup';
 import APP from '@/services';
-import { initData } from '@/common/methods';
 import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { message } from 'ant-design-vue';
 import { Ermcp3AreaStockApplySum } from '@/services/go/ermcp/warehouse-info/interface';
 import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'purchase_pending_storage',
+    emits: ['cancel'],
     components: {},
     props: {
         selectedRow: {
@@ -157,30 +158,25 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('purchase_pending_storage');
+        const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm();
         const loading = ref<boolean>(false);
         const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
         const gblist = ref<[]>([]);
         const gmlist = ref<[]>([]);
         const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
-        watchEffect(() => {
-            if (visible.value) {
-                QueryAreaStockApply(props.selectedRow.spotcontractid)
-                    .then((res) => {
-                        DGList.value = res.filter((e) => e.inouttype === 1);
-                    })
-                    .catch((err) => message.error(err));
-            }
-        });
-        initData(() => {
-            const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.deliverygoodsid === props.selectedRow.deliverygoodsid);
-            gblist.value = deliverygoods && deliverygoods.gblist;
-            gmlist.value = deliverygoods && deliverygoods.gmlist;
-            // 查询仓库信息
-            QueryWareHouse('1').then((res) => {
-                wareHouseList.value = res;
-            });
+
+        QueryAreaStockApply(props.selectedRow.spotcontractid)
+            .then((res) => {
+                DGList.value = res.filter((e) => e.inouttype === 1);
+            })
+            .catch((err) => message.error(err));
+        const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.deliverygoodsid === props.selectedRow.deliverygoodsid);
+        gblist.value = deliverygoods && deliverygoods.gblist;
+        gmlist.value = deliverygoods && deliverygoods.gmlist;
+        // 查询仓库信息
+        QueryWareHouse('1').then((res) => {
+            wareHouseList.value = res;
         });
 
         function submit() {
@@ -197,8 +193,7 @@ export default defineComponent({
                     ApplyRemark: '', // string 申请备注
                 };
                 requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['入库登记成功', '入库登记失败:']).then(() => {
-                    context.emit('refresh');
-                    cancel();
+                    cancel(true);
                 });
             });
         }

+ 60 - 58
src/views/business/purchase/list/performance/index.vue

@@ -3,82 +3,84 @@
   <div class="purchase-performance"
        :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" />
-    <!-- 交收登记 -->
-    <Settlement :selectedRow="selectedRow"
-                @refresh="queryTable" />
-    <!-- 款项登记 -->
-    <Funds :selectedRow="selectedRow"
-           @refresh="queryTable" />
-    <!-- 发票登记 -->
-    <Invoice :selectedRow="selectedRow"
-             @refresh="queryTable" />
-    <!-- 入库登记 -->
-    <Storage :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 { Detail, filterCustomTable, Settlement, Funds, Invoice, Storage } from '../../components';
+import { defineComponent, queryTableList } from '@/common/export/table';
+import BtnList from '@/common/components/btnList/index.vue';
+import contextMenu from '@/common/components/contextMenu/temp.vue';
+import { defineAsyncComponent } from 'vue';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+import { ComposeTableParam, handleComposeTable } from '@/common/setup/table/compose';
+
+import { filterCustomTable } from '../../components';
+import { QueryPurchase } from '@/services/go/ermcp/purchase';
+import { Ermcp3SellBuyContract } from '@/views/business/sell/list';
+
+const Detail = defineAsyncComponent(() => import('../../components/detail/index.vue'));
+const Settlement = defineAsyncComponent(() => import('../../components/settlement/index.vue')); //交收登记
+const Funds = defineAsyncComponent(() => import('../../components/funds/index.vue')); // 款项登记
+const Invoice = defineAsyncComponent(() => import('../../components/invoice/index.vue')); // 发票登记
+const Storage = defineAsyncComponent(() => import('../../components/storage/index.vue')); // 入库登记
 
 export default defineComponent({
     name: 'purchase-performance',
     components: {
         contextMenu,
         filterCustomTable,
-        Detail,
-        Settlement,
-        Funds,
-        Invoice,
-        Storage,
         BtnList,
+        [ModalEnum.detail]: Detail,
+        [ModalEnum.purchase_pending_settlement]: Settlement,
+        [ModalEnum.purchase_pending_funds]: Funds,
+        [ModalEnum.purchase_pending_invoice]: Invoice,
+        [ModalEnum.purchase_pending_storage]: Storage,
     },
     setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3SellBuyContract>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('purchase_performance', true);
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(3);
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_purchase_settle', ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname']);
-        });
+        const { loading, tableList, queryTable } = queryTableList<Ermcp3SellBuyContract>();
+        // 获取列表数据
+        const queryTableAction = () => queryTable(QueryPurchase, { querytype: 3 });
+        // 表格通用逻辑
+        const param: ComposeTableParam = {
+            queryFn: queryTableAction,
+            menuType: 'purchase_performance',
+            tableName: 'table_pcweb_purchase_settle',
+            tableFilterKey: ['accountname', 'contractno', 'deliverygoodsname', 'convertfactor', 'goodsname'],
+            isDetail: true,
+        };
         return {
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
+            ...handleComposeTable<Ermcp3SellBuyContract>(param),
             tableList,
-            updateColumn,
+            loading,
         };
     },
 });

+ 1 - 0
src/views/information/account_info/compoments/add-business/index.vue

@@ -88,6 +88,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'add-business-info',
     components: {},
+    emits: ['cancel'],
     props: {
         roleid: {
             default: 0,

+ 1 - 0
src/views/information/account_info/compoments/cancel-business/index.vue

@@ -36,6 +36,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'account_info_business_btn_cancel',
     components: { Detail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             default: {},

+ 1 - 0
src/views/information/account_info/compoments/detail-business/index.vue

@@ -27,6 +27,7 @@ export default defineComponent({
     components: {
         Detail,
     },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<ErmcpLoginUser>,

+ 1 - 0
src/views/information/account_info/compoments/locked-business/index.vue

@@ -30,6 +30,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'account_info_business_btn_locked',
     components: { Detail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             default: {},

+ 1 - 0
src/views/information/account_info/compoments/modify-business/index.vue

@@ -81,6 +81,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_modify',
+    emits: ['cancel'],
     components: {},
     props: {
         selectedRow: {

+ 1 - 0
src/views/information/account_info/compoments/reset-business/index.vue

@@ -65,6 +65,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'account_info_business_btn_reset',
+    emits: ['cancel'],
     props: {
         selectedRow: {
             default: {},

+ 1 - 0
src/views/information/account_info/compoments/unlocked-business/index.vue

@@ -30,6 +30,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'account_info_business_btn_unlocked',
     components: { Detail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             default: {},

+ 1 - 0
src/views/information/spot-contract/components/add/index.vue

@@ -440,6 +440,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'add-spot-contract',
     components: { UploadImg },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 0
src/views/information/spot-contract/components/cancel/index.vue

@@ -35,6 +35,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'spot-contract-detail',
     components: { InfoDetail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 0
src/views/information/spot-contract/components/check/index.vue

@@ -132,6 +132,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'spot-contract-detail',
     components: { Detail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 0
src/views/information/spot-contract/components/delete/index.vue

@@ -35,6 +35,7 @@ export default defineComponent({
     components: {
         InfoDetail,
     },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 0
src/views/information/spot-contract/components/detail/index.vue

@@ -78,6 +78,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 export default defineComponent({
     name: 'spot-contract-detail',
     components: { InfoDetail },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 1
src/views/information/spot-contract/components/finish/index.vue

@@ -33,6 +33,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'spot-contract-finish',
+    emits: ['cancel'],
     components: { InfoDetail },
     props: {
         selectedRow: {
@@ -45,7 +46,6 @@ export default defineComponent({
         const maskClosableFlag = ref<boolean>(false);
         const loading = ref<boolean>(false);
         function submit() {
-            context.emit('refresh');
             Modal.confirm({
                 title: '是否确认完结',
                 okText: '确认完结',

+ 1 - 0
src/views/information/spot-contract/components/modify/index.vue

@@ -431,6 +431,7 @@ import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: 'spot_contract_btn_modify',
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,

+ 1 - 1
src/views/platinum/platinum_agreement/compoments/modify/index.vue

@@ -86,7 +86,7 @@ export default defineComponent({
             type: Object as PropType<QhjAgreementConfig>,
         },
     },
-    setup(props: { selectedRow: QhjAgreementConfig }, context: SetupContext) {
+    setup(props: { selectedRow: QhjAgreementConfig }, context) {
         const { visible, cancel } = _closeModal(context);
 
         const loading = ref<boolean>(false);